[PATCH][C++] Fix dump-file corruption

Mark Mitchell mark@codesourcery.com
Mon Oct 10 14:13:00 GMT 2005


Richard Guenther wrote:

> Fixed by moving (swapping) a cached decls name to the position it would
> have had if it had been freshly allocated.  This ensures that we can
> reliably print strings with at least RING_SIZE decl names in them.

But, not with more names than that.  It's a bug to hold on to the memory
returned by cxx_printable_name; you have to either print or copy the
returned value immediately.  So, I don't think the bug is in
cxx_printable_name; it sounds like the bug is in whatever part of the
compiler is trying to hold on to those values.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Gcc-patches mailing list