AFLplusplus / Grammar-Mutator

A grammar-based custom mutator for AFL++
Apache License 2.0
215 stars 18 forks source link

fix: revert '+' syntax optimize && add growth check limit for 'random_recursive_mutation' #44

Closed 0x7Fancy closed 5 months ago

0x7Fancy commented 5 months ago

for issue https://github.com/AFLplusplus/Grammar-Mutator/issues/42, I revert '+' syntax optimize

for issue https://github.com/AFLplusplus/Grammar-Mutator/issues/43, Grammar-Mutator has to rely on AST to work, in the case of TOKEN conflicts, grammar parsing may fail. at the same time, Grammar-Mutator will try to retain data for nodes that fail to parse. If the depth of the syntax tree is large and grammar parsing errors occur, it may cause random_recursive_mutation to be mutated each time. the data size exceeds 1024 bytes, thus falling into do-while. I added an failed limit for this.

h1994st commented 5 months ago

LGTM. Thanks!

A kind reminder: please merge to dev branch next time :)

vanhauser-thc commented 5 months ago

@h1994st when are you pushing to stable? so I can update in the AFL++ repository :)

h1994st commented 5 months ago

@vanhauser-thc I can do it now, as there are unlikely new updates recently

h1994st commented 5 months ago

@h1994st when are you pushing to stable? so I can update in the AFL++ repository :)

Done.

vanhauser-thc commented 5 months ago

thank you!