[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #17 from Dominique d'Humieres  ---
Results with the third patch at

https://gcc.gnu.org/ml/gcc-testresults/2016-01/msg01115.html

It looks good.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-13 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #18 from Maxim Ostapenko  ---
Author: chefmax
Date: Wed Jan 13 09:27:38 2016
New Revision: 232316

URL: https://gcc.gnu.org/viewcvs?rev=232316=gcc=rev
Log:
Cherry-pick r224315 and r241487 from upstream.

PR sanitizer/69147
* asan/asan_mac.cc: Cherry pick upstream r241487.
* sanitizer_common/sanitizer_mac.cc: Cherry pick upstream r224315.
* sanitizer_common/sanitizer_mac.h: Likewise.

Modified:
branches/gcc-5-branch/libsanitizer/ChangeLog
branches/gcc-5-branch/libsanitizer/asan/asan_mac.cc
branches/gcc-5-branch/libsanitizer/sanitizer_common/sanitizer_mac.cc
branches/gcc-5-branch/libsanitizer/sanitizer_common/sanitizer_mac.h

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-13 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #19 from Maxim Ostapenko  ---
Should be fixed now.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #20 from Dominique d'Humieres  ---
> Should be fixed now.

Yes. Thanks for quick fix. Closing.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #9 from Dominique d'Humieres  ---
> Le 12 janv. 2016 à 10:11, chefmax at gcc dot gnu.org 
>  a écrit :
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
> 
> --- Comment #8 from Maxim Ostapenko  ---
> Eh, this is sad, let's try more. I suspect that ASan fails in MaybeReexec
> function (it tries to set DYLD_INSERT_LIBRARIES env variable and reexec
> itself). Dominique can I ask you two questions:
> 
> 1) I'm not good in Darwin, do you use relatively new distro?

If you speak of MacOSX, I see the problem since I have updated to « El Capitan
» (darwin-15) and the tool chain is Xcode 7.2. That is what I use for both gcc
5 and trunk and I am using recent revisions (less than a day, r232227 for gcc5)
of GCC.

> If so, this may
> explain why you don't observe test failures on trunk (because on new distros
> dynamic linker doesn't require DYLD_INSERT_LIBRARIES to be set).
> 
> 2) Could you run memcmp-1.exe with
> ASAN_OPTIONS=allow_reexec=0:debug=1:verbosity=2
> 
> setenv ASAN_OPTIONS verbosity=2:debug=1:allow_reexec=0

The test succeeds with this env. Note that asan is broken on the gcc 5 branch
not only in the test suite, but also for « real » use:

[Book15] f90/bug% gfc5 pr60795.f90 -fsanitize=address
[Book15] f90/bug% a.out
==93807==AddressSanitizer CHECK failed:
../../../../5_work/libsanitizer/asan/asan_malloc_mac.cc:103
"((!asan_init_is_running)) != (0)" (0x0, 0x0)


[Book15] f90/bug% setenv ASAN_OPTIONS allow_reexec=0
[Book15] f90/bug% a.out
  10
   1

Dominque

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #11 from Dominique d'Humieres  ---
> Upstream ASan already has the fix, attaching adapted cherry-picked commit.
> Could you try it?

My machine is currently bootstrapping the trunk. It should finish in an hour or
so. I'll test your patch when bootstrap complete. Thanks for the quick
feedback.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #8 from Maxim Ostapenko  ---
Eh, this is sad, let's try more. I suspect that ASan fails in MaybeReexec
function (it tries to set DYLD_INSERT_LIBRARIES env variable and reexec
itself). Dominique can I ask you two questions:

1) I'm not good in Darwin, do you use relatively new distro? If so, this may
explain why you don't observe test failures on trunk (because on new distros
dynamic linker doesn't require DYLD_INSERT_LIBRARIES to be set).

2) Could you run memcmp-1.exe with
ASAN_OPTIONS=allow_reexec=0:debug=1:verbosity=2

setenv ASAN_OPTIONS verbosity=2:debug=1:allow_reexec=0

?

(In reply to Dominique d'Humieres from comment #7)
> I have run memcmp-1.exe under lldb trying various break points from line 1
> to 12 and I always get
> 
> Process 45744 launched:
> '/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/memcmp-1.exe' (x86_64)
> ==45744==AddressSanitizer CHECK failed:
> ../../../../5_work/libsanitizer/asan/asan_malloc_mac.cc:103
> "((!asan_init_is_running)) != (0)" (0x0, 0x0)
> 
> 
> Process 45744 exited with status = 1 (0x0001) 
> 
> without any backtrace available.
> 
> > Le 11 janv. 2016 à 17:20, chefmax at gcc dot gnu.org 
> >  a écrit :
> > 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
> > 
> > --- Comment #6 from Maxim Ostapenko  ---
> > Ok, it seems that libasan calls some function to be intercepted while
> > AsanInitInternal still not completed. Could you try to run memcmp-1.exe 
> > under
> > gdb to provide a backtrace from failed CHECK? This way, we'll probably can
> > figure out what function was intercepted.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #10 from Maxim Ostapenko  ---
Created attachment 37310
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37310=edit
Proposed fix.

« El Capitan » is OS X 10.11, right? So, this is my vision of the problem:

In OS X 10.11+ or iOS 9.0+, dyld will interpose even if DYLD_INSERT_LIBRARIES
is not set. This means, that it's not safe to use "setenv" function to set
DYLD_INSERT_LIBRARIES in MaybeReexec, because ASan interceptors already
established and we can easily end up with something like this:

AsanInitInternal -> MaybeReexec -> setenv -> some intercepted function (say,
memmove) -> BOOM.

In fact, there is no need to reexec at all on such platforms, because we
already have working interceptors.

Upstream ASan already has the fix, attaching adapted cherry-picked commit.
Could you try it?

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #12 from Dominique d'Humieres  ---
> Upstream ASan already has the fix, attaching adapted cherry-picked commit.
> Could you try it?

Bootstrapping with this patch fails with

...
 ../../../../5_work/libsanitizer/asan/asan_mac.cc
libtool: compile:  /opt/gcc/5_build/./gcc/xgcc -shared-libgcc
-B/opt/gcc/5_build/./gcc -nostdinc++
-L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/libstdc++-v3/src
-L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/libstdc++-v3/src/.libs
-L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/libstdc++-v3/libsupc++/.libs
-B/opt/gcc/gcc5wr/x86_64-apple-darwin15.2.0/bin/
-B/opt/gcc/gcc5wr/x86_64-apple-darwin15.2.0/lib/ -isystem
/opt/gcc/gcc5wr/x86_64-apple-darwin15.2.0/include -isystem
/opt/gcc/gcc5wr/x86_64-apple-darwin15.2.0/sys-include -D_GNU_SOURCE -D_DEBUG
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-DASAN_HAS_EXCEPTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0
-DASAN_NEEDS_SEGV=1 -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT -I.
-I../../../../5_work/libsanitizer/asan -I.. -I
../../../../5_work/libsanitizer/include -I ../../../../5_work/libsanitizer
-Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC
-fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables
-fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf
-I../../libstdc++-v3/include
-I../../libstdc++-v3/include/x86_64-apple-darwin15.2.0
-I../../../../5_work/libsanitizer/../libstdc++-v3/libsupc++ -std=gnu++11 -g -O2
-MT asan_mac.lo -MD -MP -MF .deps/asan_mac.Tpo -c
../../../../5_work/libsanitizer/asan/asan_mac.cc  -fno-common -DPIC -o
.libs/asan_mac.o
../../../../5_work/libsanitizer/asan/asan_mac.cc: In function 'void
__asan::MaybeReexec()':
../../../../5_work/libsanitizer/asan/asan_mac.cc:132:68: error: 'dylib_name'
was not declared in this scope
   dyld_insert_libraries && REAL(strstr)(dyld_insert_libraries,
dylib_name);
^
...

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #13 from Maxim Ostapenko  ---
Created attachment 37313
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37313=edit
Second fix.

My bad, could you try this one?

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #14 from Dominique d'Humieres  ---
> Le 12 janv. 2016 à 13:55, chefmax at gcc dot gnu.org 
>  a écrit :
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
> 
> --- Comment #13 from Maxim Ostapenko  ---
> Created attachment 37313
>  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37313=edit
> Second fix.
> 
> My bad, could you try this one?

The second patch allows bootstrap to complete, but does not fix the problem.

Dominique

> -- 
> You are receiving this mail because:
> You reported the bug.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #15 from Maxim Ostapenko  ---
Created attachment 37316
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37316=edit
Third attempt.

Eh, it seems that I missed one another commit from upstream that needed to be
backported, sorry about that. Dominique, could you try the third version?

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-12 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #16 from Dominique d'Humieres  ---
Looks good on preliminary testing. Full regtesting in progress.

> Le 12 janv. 2016 à 16:52, chefmax at gcc dot gnu.org 
>  a écrit :
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
> 
> --- Comment #15 from Maxim Ostapenko  ---
> Created attachment 37316
>  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37316=edit
> Third attempt.
> 
> Eh, it seems that I missed one another commit from upstream that needed to be
> backported, sorry about that. Dominique, could you try the third version?
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-11 Thread y.gribov at samsung dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

Yury Gribov  changed:

   What|Removed |Added

 CC||chefmax at gcc dot gnu.org,
   ||y.gribov at samsung dot com

--- Comment #1 from Yury Gribov  ---
Cc Max.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-11 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #2 from Maxim Ostapenko  ---
Dominique, could you please run ASan tests with
ASAN_OPTIONS=debug=1:verbosity=2? This might be helpful for further debugging.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-11 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #4 from Maxim Ostapenko  ---
If you want use make check stuff, you could try this:

max:~/build/master> setenv ASAN_OPTIONS verbosity=2:debug=1
max:~/build/master> make check RUNTESTFLAGS="asan.exp=memcmp-1.c"

or add such a line to, say, memcmp-1.c:

/* { dg-set-target-env-var ASAN_OPTIONS "debug=1:verbosity=2" } */

> Could you please elaborate?
> 
> Is there a way to run manually a test with ASAN_OPTIONS=debug=1:verbosity=2?
> If yes, how (I am using tcsh)?
> If no, can I do it at the test love? If yes, how? If no, I guess I have to
> do a bootstrap with it, but how?
> 
> TIA
> 
> Dominique
> 
> > Le 11 janv. 2016 à 10:23, chefmax at gcc dot gnu.org 
> >  a écrit :
> > 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
> > 
> > --- Comment #2 from Maxim Ostapenko  ---
> > Dominique, could you please run ASan tests with
> > ASAN_OPTIONS=debug=1:verbosity=2? This might be helpful for further 
> > debugging.
> > 
> > -- 
> > You are receiving this mail because:
> > You reported the bug.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #3 from Dominique d'Humieres  ---
Could you please elaborate?

Is there a way to run manually a test with ASAN_OPTIONS=debug=1:verbosity=2? If
yes, how (I am using tcsh)?
If no, can I do it at the test love? If yes, how? If no, I guess I have to do a
bootstrap with it, but how?

TIA

Dominique

> Le 11 janv. 2016 à 10:23, chefmax at gcc dot gnu.org 
>  a écrit :
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
> 
> --- Comment #2 from Maxim Ostapenko  ---
> Dominique, could you please run ASan tests with
> ASAN_OPTIONS=debug=1:verbosity=2? This might be helpful for further debugging.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #7 from Dominique d'Humieres  ---
I have run memcmp-1.exe under lldb trying various break points from line 1 to
12 and I always get

Process 45744 launched:
'/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/memcmp-1.exe' (x86_64)
==45744==AddressSanitizer CHECK failed:
../../../../5_work/libsanitizer/asan/asan_malloc_mac.cc:103
"((!asan_init_is_running)) != (0)" (0x0, 0x0)


Process 45744 exited with status = 1 (0x0001) 

without any backtrace available.

> Le 11 janv. 2016 à 17:20, chefmax at gcc dot gnu.org 
>  a écrit :
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147
> 
> --- Comment #6 from Maxim Ostapenko  ---
> Ok, it seems that libasan calls some function to be intercepted while
> AsanInitInternal still not completed. Could you try to run memcmp-1.exe under
> gdb to provide a backtrace from failed CHECK? This way, we'll probably can
> figure out what function was intercepted.

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-11 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #6 from Maxim Ostapenko  ---
Ok, it seems that libasan calls some function to be intercepted while
AsanInitInternal still not completed. Could you try to run memcmp-1.exe under
gdb to provide a backtrace from failed CHECK? This way, we'll probably can
figure out what function was intercepted.

(In reply to Dominique d'Humieres from comment #5)
> > If you want use make check stuff, you could try this:
> >
> > max:~/build/master> setenv ASAN_OPTIONS verbosity=2:debug=1
> > max:~/build/master> make check RUNTESTFLAGS="asan.exp=memcmp-1.c"
> 
> With that I get:
> 
> LD_LIBRARY_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.
> 2.0/./libsanitizer/asan/.libs
> LD_RUN_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/
> ./libsanitizer/asan/.libs
> SHLIB_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/.
> /libsanitizer/asan/.libs
> LD_LIBRARY_PATH_32=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-
> darwin15.2.0/./libsanitizer/asan/.libs
> LD_LIBRARY_PATH_64=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-
> darwin15.2.0/./libsanitizer/asan/.libs
> DYLD_LIBRARY_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-
> darwin15.2.0/./libsanitizer/asan/.libs
> Executing on host: /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
> fsanitize_address45391.c
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/ 
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/ 
> -L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs 
> -fsanitize=address -g
> -I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
> -fno-diagnostics-show-caret -fdiagnostics-color=never  -fsanitize=address 
> -lm  -o fsanitize_address45391.exe(timeout = 300)
> spawn -ignore SIGHUP /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
> fsanitize_address45391.c
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/
> -L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
> -fsanitize=address -g
> -I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
> -fno-diagnostics-show-caret -fdiagnostics-color=never -fsanitize=address -lm
> -o fsanitize_address45391.exe^M
> Executing on host: /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
> /opt/gcc/5_work/gcc/testsuite/c-c++-common/asan/memcmp-1.c
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/ 
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/ 
> -L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs 
> -fsanitize=address -g
> -I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
> -fno-diagnostics-show-caret -fdiagnostics-color=never-O0 
> -fno-builtin-memcmp  -lm  -o ./memcmp-1.exe(timeout = 300)
> spawn -ignore SIGHUP /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
> /opt/gcc/5_work/gcc/testsuite/c-c++-common/asan/memcmp-1.c
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/
> -B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/
> -L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
> -fsanitize=address -g
> -I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
> -fno-diagnostics-show-caret -fdiagnostics-color=never -O0
> -fno-builtin-memcmp -lm -o ./memcmp-1.exe^M
> PASS: c-c++-common/asan/memcmp-1.c   -O0  (test for excess errors)
> Setting LD_LIBRARY_PATH to
> :/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./
> libsanitizer/asan/.libs::/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-
> darwin15.2.0/./libsanitizer/asan/.libs
> spawn [open ...]^M
> ==45459==Parsed ASAN_OPTIONS: verbosity=2:debug=1
> ==45459==AddressSanitizer CHECK failed:
> ../../../../5_work/libsanitizer/asan/asan_malloc_mac.cc:103
> "((!asan_init_is_running)) != (0)" (0x0, 0x0)
> 
> 
> PASS: c-c++-common/asan/memcmp-1.c   -O0  execution test
> FAIL: c-c++-common/asan/memcmp-1.c   -O0  output pattern test
> Output was:
> ==45459==Parsed ASAN_OPTIONS: verbosity=2:debug=1
> ==45459==AddressSanitizer CHECK failed:
> ../../../../5_work/libsanitizer/asan/asan_malloc_mac.cc:103
> "((!asan_init_is_running)) != (0)" (0x0, 0x0)
> 
> 
> 
> Should match:
> ERROR: AddressSanitizer: stack-buffer-overflow.*(
> |^M
> |^M)#0 0x[0-9a-f]+ +(in _*(interceptor_|wrap_|)memcmp |[(])[^
> ^M]*(
> |^M
> |^M)#1 0x[0-9a-f]+ +(in _*main|[(])[^
> ^M]*(
> |^M
> |^M)

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-11
 Ever confirmed|0   |1

--- Comment #5 from Dominique d'Humieres  ---
> If you want use make check stuff, you could try this:
>
> max:~/build/master> setenv ASAN_OPTIONS verbosity=2:debug=1
> max:~/build/master> make check RUNTESTFLAGS="asan.exp=memcmp-1.c"

With that I get:

LD_LIBRARY_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
LD_RUN_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
SHLIB_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
LD_LIBRARY_PATH_32=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
LD_LIBRARY_PATH_64=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
DYLD_LIBRARY_PATH=:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
Executing on host: /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
fsanitize_address45391.c
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/ 
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/ 
-L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs 
-fsanitize=address -g
-I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
-fno-diagnostics-show-caret -fdiagnostics-color=never  -fsanitize=address  -lm 
-o fsanitize_address45391.exe(timeout = 300)
spawn -ignore SIGHUP /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
fsanitize_address45391.c
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/
-L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
-fsanitize=address -g
-I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
-fno-diagnostics-show-caret -fdiagnostics-color=never -fsanitize=address -lm -o
fsanitize_address45391.exe^M
Executing on host: /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
/opt/gcc/5_work/gcc/testsuite/c-c++-common/asan/memcmp-1.c
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/ 
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/ 
-L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs 
-fsanitize=address -g
-I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
-fno-diagnostics-show-caret -fdiagnostics-color=never-O0 
-fno-builtin-memcmp  -lm  -o ./memcmp-1.exe(timeout = 300)
spawn -ignore SIGHUP /opt/gcc/5_build/gcc/xgcc -B/opt/gcc/5_build/gcc/
/opt/gcc/5_work/gcc/testsuite/c-c++-common/asan/memcmp-1.c
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/
-B/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/
-L/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
-fsanitize=address -g
-I/opt/gcc/5_work/gcc/testsuite/../../libsanitizer/include
-fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fno-builtin-memcmp
-lm -o ./memcmp-1.exe^M
PASS: c-c++-common/asan/memcmp-1.c   -O0  (test for excess errors)
Setting LD_LIBRARY_PATH to
:/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs::/opt/gcc/5_build/gcc:/opt/gcc/5_build/x86_64-apple-darwin15.2.0/./libsanitizer/asan/.libs
spawn [open ...]^M
==45459==Parsed ASAN_OPTIONS: verbosity=2:debug=1
==45459==AddressSanitizer CHECK failed:
../../../../5_work/libsanitizer/asan/asan_malloc_mac.cc:103
"((!asan_init_is_running)) != (0)" (0x0, 0x0)


PASS: c-c++-common/asan/memcmp-1.c   -O0  execution test
FAIL: c-c++-common/asan/memcmp-1.c   -O0  output pattern test
Output was:
==45459==Parsed ASAN_OPTIONS: verbosity=2:debug=1
==45459==AddressSanitizer CHECK failed:
../../../../5_work/libsanitizer/asan/asan_malloc_mac.cc:103
"((!asan_init_is_running)) != (0)" (0x0, 0x0)



Should match:
ERROR: AddressSanitizer: stack-buffer-overflow.*(
|^M
|^M)#0 0x[0-9a-f]+ +(in _*(interceptor_|wrap_|)memcmp |[(])[^
^M]*(
|^M
|^M)#1 0x[0-9a-f]+ +(in _*main|[(])[^
^M]*(
|^M
|^M)

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-05 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |5.4