Repository navigation
OSS-Fuzz: Create new fuzzer/corpus/dict targets xml processing - #1279
Open
arthurscchan wants to merge 2 commits into
Open
arthurscchan wants to merge 2 commits into
arthurscchan wants to merge 2 commits into
Conversation
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
facontidavide
requested changes
Nov 7, 2026
facontidavide
left a comment
Collaborator
There was a problem hiding this comment.
Thanks @arthurscchan. As it stands this target can't find the bugs it's aimed at:
- There's no round-trip check. Modes 1–2 export, re-import and export again, but never compare the results. A logic divergence (a lost
name, a dropped port) goes unnoticed. For example #1262 (SubTreenamedropped byWriteTreeToXML, fixed in #1268) would not have been found. - A failed re-import is swallowed. If
factory2.registerBehaviorTreeFromText(exported)orcreateTreethrows, that means BT.CPP can't read its own output, which is a real bug. The outercatch(const std::exception&)hides it. Exceptions are fine for the generated input, but not for the re-import. - Mode 0 duplicates
bt_fuzzer(raw bytes into the parser). writeTreeXSD(factory)andwriteTreeNodesModelXMLact on a fixed factory, so the result doesn't depend on the input. It only slows each run.
Suggested shape: generate a valid tree, exported1 = WriteTreeToXML(tree, false, false), re-import it in a fresh factory outside the try/catch (or abort() in its catch), exported2 = WriteTreeToXML(tree2, false, false), then if(exported1 != exported2) abort();. Drop mode 0 and the XSD/model writers. Happy to merge that version.
This branch has not been deployed
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.
This PR creates a new OSS-Fuzz fuzzer with corpus/dict targets xml processing, together with google/oss-fuzz#16436 to enable a new fuzzer for proejct BehaviorTree.CPP.