-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
Hi,
I am using antlr cppruntime to build a fuzzer, which needs to parse lots of different inputs of a grammar. However, the memory usage is too high (over 50G) after parsing millions of inputs. I can confirm that there are no memory leakage on my parts. I profile the memory usage and they are mostly in ParserATNSimulator.
I checked the issues (#2182, #499), which don't solve my problems: The memory usage is still high and clearing the cache makes the parser really slow sometime (completely stuck for a few minutes).
Every time I parse a input, I create a new parser as below:
ANTLRInputStream input(input_program);
XXXLexer lexer(&input);
CommonTokenStream tokens(&lexer);
tokens.fill();
XXXParser parser(&tokens);Are there any ways to limit the memory usage? Any suggestions are appreciated!
Metadata
Metadata
Assignees
Labels
No labels