diff mbox

fix PR sanitizer/78267

Message ID CAJMcOU_2paL-11097SVVbicy8gtz=B+fEHq59bNDfRh8CnP7Sw@mail.gmail.com
State New
Headers show

Commit Message

Jack Howarth Nov. 14, 2016, 4:57 p.m. UTC
The attached patch fixes PR sanitizer/78267 by conditionalizing the
include of <os/trace.h> on the compiler defining __BLOCKS__ as a
supported extension. Passes bootstrap on x86_64-apple-darwin15. Okay
for gcc trunk?
2016-11-14  Jack Howarth  <howarth.at.gcc@gmail.com>

libsanitizer/

	PR sanitizer/78267
	* sanitizer_common/sanitizer_mac.cc: Include <os/trace.h> only if
	compiler supports blocks extension.

Comments

Iain Sandoe Nov. 14, 2016, 4:59 p.m. UTC | #1
> On 14 Nov 2016, at 16:57, Jack Howarth <howarth.at.gcc@gmail.com> wrote:
> 
> The attached patch fixes PR sanitizer/78267 by conditionalizing the
> include of <os/trace.h> on the compiler defining __BLOCKS__ as a
> supported extension. Passes bootstrap on x86_64-apple-darwin15. Okay
> for gcc trunk?
> <PR78267.diff>

Rainer has that PR assigned and is making a proper fix (which will prevent other failures on the port), unless he decides to punt on it, I think we should wait and get a proper fix,

Iain
Mike Stump Nov. 14, 2016, 6:08 p.m. UTC | #2
On Nov 14, 2016, at 8:59 AM, Iain Sandoe <iain@codesourcery.com> wrote:
> 
>> On 14 Nov 2016, at 16:57, Jack Howarth <howarth.at.gcc@gmail.com> wrote:
>> 
>> The attached patch fixes PR sanitizer/78267 by conditionalizing the
>> include of <os/trace.h> on the compiler defining __BLOCKS__ as a
>> supported extension. Passes bootstrap on x86_64-apple-darwin15. Okay
>> for gcc trunk?
>> <PR78267.diff>
> 
> Rainer has that PR assigned and is making a proper fix (which will prevent other failures on the port), unless he decides to punt on it, I think we should wait and get a proper fix,

I'm fine with waiting if Jack wants, but the danger is leaving things in a non-working state for too long, and things can pile up.  I'd rather put in the fix to the build, now, and, if technology advances to allow that code to be removed later, it always can be.  If people are to wait, it is better to know how long to wait.  A week, a month, a year?  Then, when that time passes, they know to ask again.  How long should we wait?
Rainer Orth Nov. 14, 2016, 6:14 p.m. UTC | #3
Hi Mike,

> On Nov 14, 2016, at 8:59 AM, Iain Sandoe <iain@codesourcery.com> wrote:
>> 
>>> On 14 Nov 2016, at 16:57, Jack Howarth <howarth.at.gcc@gmail.com> wrote:
>>> 
>>> The attached patch fixes PR sanitizer/78267 by conditionalizing the
>>> include of <os/trace.h> on the compiler defining __BLOCKS__ as a
>>> supported extension. Passes bootstrap on x86_64-apple-darwin15. Okay
>>> for gcc trunk?
>>> <PR78267.diff>
>> 
>> Rainer has that PR assigned and is making a proper fix (which will
>> prevent other failures on the port), unless he decides to punt on it, I
>> think we should wait and get a proper fix,
>
> I'm fine with waiting if Jack wants, but the danger is leaving things in a
> non-working state for too long, and things can pile up.  I'd rather put in
> the fix to the build, now, and, if technology advances to allow that code
> to be removed later, it always can be.  If people are to wait, it is better
> to know how long to wait.  A week, a month, a year?  Then, when that time
> passes, they know to ask again.  How long should we wait?

my patch has been verified to work on 10.12.  The revised patch has been
developed with a copy of the affected 10.11 headers, but needs to be
tested on the real thing.  Iain has provided me with the affected 10.10
headers and I expect to have an augmented patch ready today or tomorrow.

	Rainer
diff mbox

Patch

Index: libsanitizer/sanitizer_common/sanitizer_mac.cc
===================================================================
--- libsanitizer/sanitizer_common/sanitizer_mac.cc	(revision 242387)
+++ libsanitizer/sanitizer_common/sanitizer_mac.cc	(working copy)
@@ -34,7 +34,7 @@ 
 extern char **environ;
 #endif
 
-#if defined(__has_include) && __has_include(<os/trace.h>)
+#if defined(__has_include) && __has_include(<os/trace.h>) && defined(__BLOCKS__)
 #define SANITIZER_OS_TRACE 1
 #include <os/trace.h>
 #else