Hi,
reportedly, the patchlet which plugged the memory leak reported in
PR36819 can cause problems when heads[QUOTE] or tails[QUOTE]. Thus I'm
finishing testing the below. Really, if we have reasons to believe that
the issue is much more complex than this, I guess we can also revert
PR36819, -I- itself is deprecated, so..
Thanks,
Paolo.
/////////////////////
2011-11-09 Paolo Carlini <paolo.carl...@oracle.com>
PR preprocessor/51061
* incpath.c (merge_include_chains): Make sure to not pass null
pointers to free_path.
Index: incpath.c
===================================================================
--- incpath.c (revision 181201)
+++ incpath.c (working copy)
@@ -362,8 +362,10 @@ merge_include_chains (const char *sysroot, cpp_rea
void
split_quote_chain (void)
{
- free_path (heads[QUOTE], REASON_QUIET);
- free_path (tails[QUOTE], REASON_QUIET);
+ if (heads[QUOTE])
+ free_path (heads[QUOTE], REASON_QUIET);
+ if (tails[QUOTE])
+ free_path (tails[QUOTE], REASON_QUIET);
heads[QUOTE] = heads[BRACKET];
tails[QUOTE] = tails[BRACKET];
heads[BRACKET] = NULL;