From owner-freebsd-bugs@freebsd.org Sun Feb 21 00:14:10 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8DBDAA777D for ; Sun, 21 Feb 2016 00:14:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 905211BDF for ; Sun, 21 Feb 2016 00:14:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1L0EAwR050988 for ; Sun, 21 Feb 2016 00:14:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207325] projects/clang380-import for TARGET_ARCH=powerpc : c++ exceptions cause SEGV (9 line program) Date: Sun, 21 Feb 2016 00:14:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2016 00:14:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207325 --- Comment #1 from Mark Millard --- (In reply to Mark Millard from comment #0) If for TARGET_ARCH=3Dpowerpc I try using lang/gcc5 at the compiler instead = of clang 3.8.0: # g++5 -I /usr/include/c++/v1/ -L /usr/lib/ -g -Wall -pedantic exception_test.cpp or # g++5 -g -Wall -pedantic exception_test.cpp or # g++49 -g -Wall -pedantic exception_test.cpp or # g++49 -I /usr/include/c++/v1/ -L /usr/lib/ -g -Wall -pedantic exception_test.cpp (Note the lack of -Wl,-rpath=3D/usr/local/lib/gcc5 or -Wl,-rpath=3D/usr/local/lib/gcc5 use.) Then for the ./a.out I get the same SEGV at the same place as with clang 3.= 8.0 as the compiler in use, despite g++5's/g++49's use of _Unwind_Resume_or_Ret= hrow being the caller of _Unwind_RaiseException: # ./a.out terminate called after throwing an instance of 'std::exception' Segmentation fault (core dumped) Picking one core's backtrace to display: Core was generated by `a.out'. Program terminated with signal SIGSEGV, Segmentation fault. #0 _Unwind_GetGR (context=3D0xffffce80, index=3D) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:177 177 return * (_Unwind_Ptr *) ptr; (gdb) bt #0 _Unwind_GetGR (context=3D0xffffce80, index=3D) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:177 #1 _Unwind_GetPtr (context=3D0xffffce80, index=3D) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:188 #2 uw_update_context (context=3D0xffffce80, fs=3D0xffffc9c0) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:1370 #3 _Unwind_RaiseException (exc=3D) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind.inc:126 #4 0x41a25d8c in _Unwind_Resume_or_Rethrow (exc=3D) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind.inc:256 Backtrace stopped: previous frame inner to this frame (corrupt stack?) The following do not fail: # g++49 -Wl,-rpath=3D/usr/local/lib/gcc49 -g -Wall -pedantic exception_test= .cpp # ./a.out # g++5 -Wl,-rpath=3D/usr/local/lib/gcc5 -g -Wall -pedantic exception_test.c= pp # ./a.out # --=20 You are receiving this mail because: You are the assignee for the bug.=