I've managed to get the parser & scanner generated from Bison &
Flex to leak
-- and not from my own actions. I don't know whether it is caused
by me using
them in a wrong way, or because Flex and/or Bison contains bugs.
Below
comments have as background Bison 2.0, Flex 2.5.4, and valgrind
3.0.1.
==21666== 1725 bytes in 41 blocks are definitely lost in loss
record 170 of
202
==21666== at 0x1B8FEA7B: malloc (vg_replace_malloc.c:149)
==21666== by 0x1BB2C225: XPathparse(KXPATH::ParserInformation*)
(XPathParser.tab.cpp:2174)
I don't remember seeing this one before; either it's one that was
introduced in a recent release, or you're using the lalr1.cc
skeleton (although that seems unlikely as this is a plain malloc
call). I'd suggest looking at line 2174 of XPathParser.tab.cpp to
see what is being allocated, and where it's used - that might suggest
a cause for the leak.