public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "schwab@linux-m68k.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/59109] New: [4.9 regression] ICE in mark_reachable_handlers, at tree-eh.c:3826
Date: Wed, 13 Nov 2013 11:38:00 -0000	[thread overview]
Message-ID: <bug-59109-4@http.gcc.gnu.org/bugzilla/> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5360 bytes --]

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59109

            Bug ID: 59109
           Summary: [4.9 regression] ICE in mark_reachable_handlers, at
                    tree-eh.c:3826
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: schwab@linux-m68k.org
                CC: law at gcc dot gnu.org
            Target: ia64-*-*

Broken by r204708.

$ ../../xgcc -B../../ -c -O2 -g -W -Wall  -gnatpg -gnata -I- -I../rts -I.
-I../../../../gcc/ada ../../../../gcc/ada/make.adb -o make.o
../../../../gcc/ada/make.adb: In function
‘Make.Compile_Sources.Start_Compile_If_Possible’:
../../../../gcc/ada/make.adb:2613:32: warning: ‘Pid’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
../../../../gcc/ada/make.adb:2519:10: note: ‘Pid’ was declared here
+===========================GNAT BUG DETECTED==============================+
| 4.9.0 20131113 (experimental) (ia64-suse-linux) GCC error:               |
| in mark_reachable_handlers, at tree-eh.c:3826                            |
| Error detected around ../../../../gcc/ada/make.adb:3312:7                |

#1  0x4000000001257b10 in mark_reachable_handlers (
    r_reachablep=<optimized out>, lp_reachablep=<optimized out>)
    at ../../gcc/tree-eh.c:3826
3826                      gcc_assert (gsi_one_before_end_p (gsi));
>From gcc-bugs-return-434451-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Nov 13 11:53:38 2013
Return-Path: <gcc-bugs-return-434451-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18400 invoked by alias); 13 Nov 2013 11:53:38 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16772 invoked by uid 48); 13 Nov 2013 11:52:59 -0000
From: "glider at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/58994] asan.exp regressions on x86_64 darwin at -m64 but not -m32 at r204372
Date: Wed, 13 Nov 2013 11:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glider at google dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58994-4-bJyNQL1AAH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58994-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58994-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg01228.txt.bz2
Content-length: 2003

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX994

--- Comment #7 from Alexander Potapenko <glider at google dot com> ---
If I compile stack-overflow-1.c with 'clang -fsanitize­dress -c', the
resulting object file can be linked into an executable with either 'clang
-fsanitize­dress' or 'gcc -fsanitize­dress' (this requires declaring "void
*__asan_mapping_offset=0x100000000000;", since the GCC instrumentation pass
doesn't insert the mapping offset). The executable linked with Clang works just
fine, while the GCC one crashes on the same env_ptr assertion.

Clang:
$ $CLANG  stack-overflow-1.o -fsanitize­dress -v && ./a.out
...
"/usr/bin/ld" -dynamic -arch x86_64 -macosx_version_min 10.8.0 -o a.out
stack-overflow-1.o -lstdc++
/Users/glider/src/asan/llvm/llvm_cmake_build/bin/../lib/clang/3.4/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
-lSystem
=================================================================7032==ERROR: AddressSanitizer: stack-buffer-overflow on address
0x7fff5add8aea at pc 0x104e27c93 bp 0x7fff5add89f0 sp 0x7fff5add89e8
...

GCC:
$ $GCC  stack-overflow-1.o -fsanitize­dress -v && ./a.out
...
/usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.8.5
-weak_reference_mismatches non-weak -o a.out
-L/Users/glider/src/gcc-asan/build/inst/lib/gcc/x86_64-apple-darwin12.5.0/4.9.0
-L/Users/glider/src/gcc-asan/build/inst/lib/gcc/x86_64-apple-darwin12.5.0/4.9.0/../../..
stack-overflow-1.o -lasan -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc
-lSystem -v
...
=7029=­dressSanitizer CHECK failed:
../../../../libsanitizer/sanitizer_common/sanitizer_mac.cc:146 "((env_ptr)) !(0)" (0x0, 0x0)


This seems to have nothing to do with the linkage order: I've tried to change
the order of -l flags in the ld invocation from $GCC, but that didn't work.
However when I replaced '-lasan' with the full path to the ASan runtime from
the Clang build, it worked fine. So there's some subtle difference between the
ASan runtimes compiled when building GCC and Clang.


             reply	other threads:[~2013-11-13 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 11:38 schwab@linux-m68k.org [this message]
2013-11-13 12:14 ` [Bug tree-optimization/59109] " rguenth at gcc dot gnu.org
2013-11-13 17:25 ` ebotcazou at gcc dot gnu.org
2013-11-14  3:44 ` law at redhat dot com
2013-11-15  7:21 ` law at redhat dot com

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-59109-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: link
Be 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).