Re-enables FuzzParseDoc - #37
Merged
Merged
Conversation
The original FuzzParseDoc property was removed when crash-resistance fuzz tests were added (PR #32) because feeding arbitrary byte strings to Xml2Doc.parseDoc triggered cumulative state corruption inside libxml2 - a segfault or "free(): invalid pointer" abort after ~5-10 distinct failed parses. The crash was cumulative across inputs but did not reproduce when the same input was reparsed in a loop, suggesting state buildup in libxml2's internal error context across failed parses. PR #36 (errors-as-data refactor) routes parse failures through Xml2Error.from_last_error, which calls xmlResetError after reading the per-thread last-error. This appears to clear the state buildup that previously caused the corruption. Re-enabling the property with the default 100-sample budget. Five consecutive `make test` runs (500 distinct failed-parse attempts) complete without incident, well past the original ~5-10 crash threshold. The crash-resistance contract is back in force for the parse path. No release note: test-only change, follows PR #32 / #22 precedent of not generating CHANGELOG entries for test additions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original FuzzParseDoc property was removed when crash-resistance fuzz tests were added (PR #32) because feeding arbitrary byte strings to Xml2Doc.parseDoc triggered cumulative state corruption inside libxml2 - a segfault or "free(): invalid pointer" abort after ~5-10 distinct failed parses. The crash was cumulative across inputs but did not reproduce when the same input was reparsed in a loop, suggesting state buildup in libxml2's internal error context across failed parses.
PR #36 (errors-as-data refactor) routes parse failures through Xml2Error.from_last_error, which calls xmlResetError after reading the per-thread last-error. This appears to clear the state buildup that previously caused the corruption.
Re-enabling the property with the default 100-sample budget. Five consecutive
make testruns (500 distinct failed-parse attempts) complete without incident, well past the original ~5-10 crash threshold. The crash-resistance contract is back in force for the parse path.No release note: test-only change, follows PR #32 / #22 precedent of not generating CHANGELOG entries for test additions.