Memory leak - buffer stack cleanup
When scanner terminates with more than one buffer on the stack, yylex_destroy does not properly free all the buffers resulting in a memory leak.
I have the following questions:
- What is an example scanner that exhibits this problem?
- What steps do I need to take to reproduce this problem?
- What do I need to do to see that the problem exists?
Thanks,
--Will
On Friday, 28 September 2018, 6:20 am -0700, happyCoder92 [email protected] wrote:
When scanner terminates with more than one buffer on the stack, yylex_destroy does not properly free all the buffers resulting in a memory leak.
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/westes/flex/issues/392
-- Will Estes [email protected]
Even the example scanner from Multiple-Input-Buffers docs section if you try to include a non-existent file in yet another included file. Compiling with ASAN will make spotting the memory leak easy. You can also try it with https://github.com/google/kafel/commit/8724cf5c55b40b53e0b1cb60f6868c5bfa4c4a56
$ DEBUG=1 ASAN=1 make all test