public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch] PR 51061
@ 2011-11-09 16:43 Paolo Carlini
  2011-11-09 17:39 ` Joseph S. Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Carlini @ 2011-11-09 16:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: jsm28

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

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.

/////////////////////

[-- Attachment #2: CL_51061 --]
[-- Type: text/plain, Size: 166 bytes --]

2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR preprocessor/51061
	* incpath.c (merge_include_chains): Make sure to not pass null
	pointers to free_path.

[-- Attachment #3: patch_51061 --]
[-- Type: text/plain, Size: 565 bytes --]

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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch] PR 51061
  2011-11-09 16:43 [Patch] PR 51061 Paolo Carlini
@ 2011-11-09 17:39 ` Joseph S. Myers
  2011-11-09 17:41   ` Paolo Carlini
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph S. Myers @ 2011-11-09 17:39 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: gcc-patches

On Wed, 9 Nov 2011, Paolo Carlini wrote:

> 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..

This patch is OK.  There have been various arguments against the -I- 
deprecation (see PR 19541); I haven't really followed them, but my 
impression is that the deprecation has probably proved to be a bad idea in 
practice.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch] PR 51061
  2011-11-09 17:39 ` Joseph S. Myers
@ 2011-11-09 17:41   ` Paolo Carlini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Carlini @ 2011-11-09 17:41 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On 11/09/2011 06:21 PM, Joseph S. Myers wrote:
> On Wed, 9 Nov 2011, Paolo Carlini wrote:
>
>> 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..
> This patch is OK.  There have been various arguments against the -I-
> deprecation (see PR 19541); I haven't really followed them, but my
> impression is that the deprecation has probably proved to be a bad idea in
> practice.
I see. I committed the patch.

Thanks,
Paolo.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-09 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 16:43 [Patch] PR 51061 Paolo Carlini
2011-11-09 17:39 ` Joseph S. Myers
2011-11-09 17:41   ` Paolo Carlini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).