This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix memory leak in std::moneypunct


Andreas Schwab wrote:

This fixes a memory leak in std::moneypunct, causing
22_locale/locale/cons/12352.cc to crash when running in a non-trivial
locale.  Tested on ia64-linux.  OK for 3.4 and 3.5?

Ah! So you found it!

I didn't remember that monetary_members.cc also contains memory
allocations wrapped in try/catch... and the failure can be reproduced
only with some glibcs.

The patch is ok for 3.4 and 3.5 of course and the try/catch block itself
should be added to 3.3 too since we have already patched all the other
possible causes of memory leaks there too... Are you willing to do that?

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]