C++ PATCH: obstack leakage -> segfault
mark@codesourcery.com
mark@codesourcery.com
Wed May 26 10:01:00 GMT 1999
>>>>> "Nathan" == Nathan Sidwell <nathan@acm.org> writes:
Nathan> I attach a patch to complete_array_type (decl.c) which
Nathan> makes sure the domain is placed in the permanent obstack,
Nathan> if anything it's being attached to is. (Perhaps it should
Nathan> always be placed on the permanent obstack?)
Contrary to what Jason just said, I don't like this patch. :-)
I'd prefer calling `push_obstacks (TYPE_OBSTACK (type))' and
`pop_obstacks ()' around the call to build_index_type. That would
save the copy, and preserves the invariant you *really* want: all
pieces of a type ought to live on the same obstack.
Does that not work?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches
mailing list