RE: [AD] A small bugfix in allegro_exit

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Title: RE: [AD] A small bugfix in allegro_exit

> Ah! yes, of course. And Fortify doesn't contain any special
> provision for
> constructors?

No.

> Then why does Fortify take this stuff into account, if it is
> live before and
> after its own live range?

There's not really such a thing as Fortify's own live range.
Fortify replaces malloc and friends with its own versions. There
are to be a time to decide to show memory that's not been freed,
to show leaks. When to do it ? You never know if a free will be
called again, and if you wait, you run the risk of the program
terminating. Fortify will catch all allocs, and all frees, AFAIK,
but the leak report is done before the very last free, because
it happens in a destructor.
Granted, I could declare myself a destructor function with a
very low priority, and rely on GNU ld to call Fortify's leak
checker at the very last thing, but that's not very satisfying
either.

--
Vincent Penquerc'h



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/