Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce memory usage of the construct_automata script #1481

Merged
merged 24 commits into from
Sep 5, 2023

Conversation

lenawanel
Copy link
Contributor

this is a series of commits aiming to increasing the speed and reduce the memory usage of the construct_automaton crate.
I don't see any further big gains except making Trigger hold &strs instead of strings, or parallelizing the loop at line 141.
making Triggers hold &str in particular might reduce the memory usage to an extend where it becomes possible to use the crate on the provided js grammar without an it being killed by OOM.
It would however be a breaking change, since the deserialized source all Automaton structs in fuzzers would need to live as long as them.

@lenawanel lenawanel changed the title reduce memory usage construct_automata script reduce memory usage of the construct_automata script Aug 29, 2023
@andreafioraldi
Copy link
Member

Hey, ty, have you extensively tested that the output is like before? In that case, LGTM we can merge it

@lenawanel
Copy link
Contributor Author

lenawanel commented Sep 5, 2023

I tested it with every provided grammar except the test1 grammar and up to a stack limit of 4 for the js grammar, and they produce the same output A before.

@andreafioraldi andreafioraldi merged commit c791a23 into AFLplusplus:main Sep 5, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants