[Bug libbacktrace/88063] Libbacktrace leak on dwarf read failure
vries at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 21 17:09:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88063
--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #9)
> Created attachment 45059 [details]
> Second followup patch
>
> > [ OTOH, that's a memory leak in the fail
> > case, but corresponds to unused memory in the success case, so we might
> > wanna fix that as well, by keeping track of the number of struct unit_addr
> > found, and freeing the struct unit at the end of the 'while (info.left > 0)'
> > loop when it's 0. Perhaps that's worth a seperate patch. ]
>
> Patch implementing this memory optimization.
After instrumenting the patch to print a marker when this triggers, we have
these trigger counts in the tests:
...
$ grep -c 'HERE!!!' *.log
btest.log:94
ctesta.log:94
ctestg.log:94
dtest.log:94
edtest.log:94
stest.log:0
ttest.log:1000
ztest.log:0
...
So, this seems common enough.
More information about the Gcc-bugs
mailing list