Bug 78663 - [7 Regression] Hundreds of asan failures on x86_64-apple-darwin10 at r243019
Summary: [7 Regression] Hundreds of asan failures on x86_64-apple-darwin10 at r243019
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: sanitizer (show other bugs)
Version: 7.0
: P1 normal
Target Milestone: 7.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-03 15:16 UTC by Dominique d'Humieres
Modified: 2017-02-04 14:37 UTC (History)
4 users (show)

See Also:
Host:
Target: x86_64-apple-darwin10
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-12-04 00:00:00


Attachments
Patch from Iain Sandoe (1.03 KB, patch)
2016-12-04 11:04 UTC, Dominique d'Humieres
Details | Diff
Fix 2 (1.01 KB, patch)
2017-02-01 16:46 UTC, Maxim Ostapenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2016-12-03 15:16:01 UTC
At r243019 I see hundreds of asan failures on x86_64-apple-darwin10 of the kind

FAIL: c-c++-common/asan/bitfield-1.c   -O0  output pattern test, is dyld: Symbol not found: _memmem

x86_64-apple-darwin16 is OK.
Comment 1 Dominique d'Humieres 2016-12-04 11:04:16 UTC
Created attachment 40240 [details]
Patch from Iain Sandoe

Results with the patch at https://gcc.gnu.org/ml/gcc-testresults/2016-12/msg00469.html.
Comment 2 Jakub Jelinek 2016-12-22 11:59:15 UTC
This probably needs to go to upstream compiler-rt first.  Also, it would be cleaner not to define SI_MEMMEM to 1 on Windows and move the comment there.
Comment 3 Jakub Jelinek 2017-01-17 10:04:41 UTC
Have you raised this with compiler-rt upstream already?
Comment 4 Iain Sandoe 2017-01-28 14:41:15 UTC
(In reply to Jakub Jelinek from comment #3)
> Have you raised this with compiler-rt upstream already?

I don't believe that upstream supports the sanitisers for Darwin < 11.

However, as seen, they are quite capable of function with a little TLC.  I don't have a chance to progress this until at least mid-Feb, if it's more urgent, then (a) please adopt some version of the patch locally, or (b) disable for Darwin < 11.
Comment 5 Maxim Ostapenko 2017-01-30 08:45:37 UTC
(In reply to Iain Sandoe from comment #4)
> (In reply to Jakub Jelinek from comment #3)
> > Have you raised this with compiler-rt upstream already?
> 
> I don't believe that upstream supports the sanitisers for Darwin < 11.
> 
> However, as seen, they are quite capable of function with a little TLC.  I
> don't have a chance to progress this until at least mid-Feb, if it's more
> urgent, then (a) please adopt some version of the patch locally, or (b)
> disable for Darwin < 11.

They don't, but they can actually accept the patch for Darwin 10 (I used to commit such patches after previous merge).
I can post attached fix upstream, but than I'll ask you (or Dominique) for help in testing if they won't accept the patch as it is (most likely they won't).
Comment 6 Maxim Ostapenko 2017-01-30 17:30:24 UTC
(In reply to Maxim Ostapenko from comment #5)
> (In reply to Iain Sandoe from comment #4)
> > (In reply to Jakub Jelinek from comment #3)
> > > Have you raised this with compiler-rt upstream already?
> > 
> > I don't believe that upstream supports the sanitisers for Darwin < 11.
> > 
> > However, as seen, they are quite capable of function with a little TLC.  I
> > don't have a chance to progress this until at least mid-Feb, if it's more
> > urgent, then (a) please adopt some version of the patch locally, or (b)
> > disable for Darwin < 11.
> 
> They don't, but they can actually accept the patch for Darwin 10 (I used to
> commit such patches after previous merge).
> I can post attached fix upstream, but than I'll ask you (or Dominique) for
> help in testing if they won't accept the patch as it is (most likely they
> won't).

I've initiated discussion upstream: https://reviews.llvm.org/D29287
Comment 7 Maxim Ostapenko 2017-02-01 16:46:31 UTC
Created attachment 40646 [details]
Fix 2

Iain, could you test the following patch? This one is likely to be applied upstream.
As a side note, LLVM folks are not very happy with these patches (they lack of buildbots to test them). Thus I suspect that for future releases we'll need a) apply Darwin 10 patches locally or b) disable ASan for Darwin 10.
Comment 8 Dominique d'Humieres 2017-02-03 10:25:19 UTC
> Created attachment 40646 [details]
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40646&action=edit
> Fix 2

I have tested the patch on darwin10 and 16. On darwin10 the failures are fixed as with the Iain's patch, no regression on darwin16. Thanks.
Comment 9 chefmax 2017-02-03 12:18:32 UTC
Author: chefmax
Date: Fri Feb  3 12:17:59 2017
New Revision: 245149

URL: https://gcc.gnu.org/viewcvs?rev=245149&root=gcc&view=rev
Log:
	PR sanitizer/78663
	* sanitizer_common/sanitizer_mac.cc: Cherry-pick upstream r293992.
	* sanitizer_common/sanitizer_platform_interceptors.h: Likewise.

Modified:
    trunk/libsanitizer/ChangeLog
    trunk/libsanitizer/sanitizer_common/sanitizer_mac.cc
    trunk/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
Comment 10 Jakub Jelinek 2017-02-03 13:03:35 UTC
So fixed?
Comment 11 Dominique d'Humieres 2017-02-04 14:37:04 UTC
> So fixed?

AFAICT from my tests on darwin10 and 16 yes! Closing.