public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/59148] New: FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0 execution test on darwin13 Date: Fri, 15 Nov 2013 17:08:00 -0000 [thread overview] Message-ID: <bug-59148-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59148 Bug ID: 59148 Summary: FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0 execution test on darwin13 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: howarth at nitro dot med.uc.edu CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org At r204847, on x86_64-apple-darwin13, the following regressions remain... === gcc tests === Running target unix/-m32 FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0 execution test === gcc Summary for unix/-m32 === # of expected passes 324 # of unexpected failures 1 # of unsupported tests 101 Running target unix/-m64 FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0 execution test === gcc Summary for unix/-m64 === # of expected passes 324 # of unexpected failures 1 # of unsupported tests 101 === gcc Summary === # of expected passes 648 # of unexpected failures 2 # of unsupported tests 202 /sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc/xgcc version 4.9.0 20131115 (experimental) (GCC) Compiler version: 4.9.0 20131115 (experimental) (GCC) Platform: x86_64-apple-darwin13.0.0 configure flags: --prefix=/sw --prefix=/sw/lib/gcc4.9 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.9/info --enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-isl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --enable-checking=yes --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.9 The failures appear as... Executing on host: /sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc49-4.9.0-1000/gcc-4.9-20131115/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c -B/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/ -L/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/.libs -fsanitize=address -g -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fno-builtin-malloc -fno-builtin-strncpy -lm -m32 -o ./strncpy-overflow-1.exe (timeout = 300) spawn /sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc49-4.9.0-1000/gcc-4.9-20131115/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c -B/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/ -L/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/.libs -fsanitize=address -g -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fno-builtin-malloc -fno-builtin-strncpy -lm -m32 -o ./strncpy-overflow-1.exe^M PASS: c-c++-common/asan/strncpy-overflow-1.c -O0 (test for excess errors) Setting LD_LIBRARY_PATH to :/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc:/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/.libs::/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc:/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/.libs:/usr/local/NMRPipe/nmrbin.mac/lib spawn [open ...]^M FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0 execution test If I compile the failing test case with... /sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc49-4.9.0-1000/gcc-4.9-20131115/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c -B/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/ -L/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin13.0.0/i386/libsanitizer/asan/.libs -fsanitize=address -g -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fno-builtin-malloc -fno-builtin-strncpy -lm -m32 -mmacosx-version-min=10.8 -o ./strncpy-overflow-1.exe it still 'FAILS' by passing, but if I move that strncpy-overflow-1.exe binary to a x86_64-apple-darwin12 box with the same build of gcc trunk on the x86_64-apple-darwin12 target, it works as expected... % ./strncpy-overflow-1.exe ================================================================= ==16663==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x01c00759 at pc 0xd501d bp 0xbff428a8 sp 0xbff42488 WRITE of size 10 at 0x01c00759 thread T0 #0 0xd501c (/sw/lib/gcc4.9/lib/i386/libasan.1.dylib+0x1101c) #1 0xbed41 (/Users/howarth/./strncpy-overflow-1.exe+0x1d41) #2 0x99852724 (/usr/lib/system/libdyld.dylib+0x2724) #3 0x0 0x01c00759 is located 0 bytes to the right of 9-byte region [0x01c00750,0x01c00759) allocated by thread T0 here: #0 0xde0f2 (/sw/lib/gcc4.9/lib/i386/libasan.1.dylib+0x1a0f2) #1 0xbed28 (/Users/howarth/./strncpy-overflow-1.exe+0x1d28) #2 0x99852724 (/usr/lib/system/libdyld.dylib+0x2724) #3 0x0 Shadow bytes around the buggy address: 0x20380090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x203800a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x203800b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x203800c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x203800d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x203800e0: fa fa fa fa fa fa fa fa fa fa 00[01]fa fa 06 fa 0x203800f0: fa fa 00 fa fa fa 00 04 fa fa 00 07 fa fa fd fa 0x20380100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x20380110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x20380120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x20380130: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 ASan internal: fe ==16663==ABORTING
next reply other threads:[~2013-11-15 17:08 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-15 17:08 howarth at nitro dot med.uc.edu [this message] 2013-11-15 18:43 ` [Bug sanitizer/59148] " dominiq at lps dot ens.fr 2013-11-15 21:02 ` howarth at nitro dot med.uc.edu 2013-11-21 9:43 ` glider at google dot com 2013-11-22 12:48 ` jakub at gcc dot gnu.org 2013-11-22 13:57 ` glider at google dot com 2013-11-22 21:30 ` howarth at nitro dot med.uc.edu 2014-11-19 13:54 ` [Bug sanitizer/59148] FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0 execution test fxcoudert at gcc dot gnu.org 2014-11-21 23:10 ` dominiq at lps dot ens.fr
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59148-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).