Shahrukh Rohinton Tarapore reports:

we have found a memory leak in ast2abox when the pretty printer is invoked. What seems to happen is a hashtable is created from the pretty printing tables by the pptable-make-hashtable strategy. However this hashtable is never freed (or marked for garbage collection) once the ast2abox strategy completes.

I have created a small test which demonstrates the leak and included valgrind output showing the leak. If you take a look at transform.str you’ll see the test iterates 10000 times. Oddly enough if it is set to run only 1000 times the memory leak is not detected by valgrind.

Submitted on 16 January 2009 at 15:20

On 18 January 2009 at 20:49 Jira commented:

STR-763, karltk:
This bug appears with revision 18341, but disappears in 18346. I fixed a memory corruption bug in the sglr library between these two revisions, but it’s admittedly a bit weird that this fix also solves the ast2abox issue. I might have to do with ast2abox calling parse-pptable-file, and this somehow invokes the faulty parse table code.

It remains unreproducible with 18385. I’ve asked Shahrukh for his rev.

On 23 June 2009 at 19:30 Jira commented:

STR-763, karltk:
Cannot reproduce.

Log in to post comments