mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
fuzz: correct stale comment about lazy parsing in ifcparse fuzzer
Construction of IfcFile already tokenizes, type-checks, and resolves every attribute of every instance, so toString() isn't what makes tokenizer/argument bugs reachable.
This commit is contained in:
@@ -38,11 +38,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
IfcParse::IfcFile file(const_cast<void*>(static_cast<const void*>(data)), static_cast<int>(size));
|
||||
|
||||
if (file.good()) {
|
||||
// IfcOpenShell parses lazily: merely constructing IfcFile only
|
||||
// tokenizes the header and indexes instance byte offsets.
|
||||
// toString() forces every attribute of every instance to be
|
||||
// fully parsed, which is where most tokenizer/argument bugs
|
||||
// would actually be reachable.
|
||||
// Constructing IfcFile already tokenizes and type-checks every
|
||||
// attribute of every instance (and resolves references), so
|
||||
// most tokenizer/argument bugs are reachable without going any
|
||||
// further. toString() is still exercised here since
|
||||
// reserialization walks a different code path and may surface
|
||||
// additional faults.
|
||||
std::ostringstream discard;
|
||||
for (const auto& entity : file) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user