From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8A99A386EC47; Sat, 23 Jan 2021 20:33:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A99A386EC47 From: "hanicka at hanicka dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98805] New: exception abort on mac os 11 (big sur) Date: Sat, 23 Jan 2021 20:33:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hanicka at hanicka dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2021 20:33:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98805 Bug ID: 98805 Summary: exception abort on mac os 11 (big sur) Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Any C++ code I try to compile with GCC 10.2.0 (homebrew package AND build f= rom source) aborts when exception is thrown even when the exception should caug= ht. This minimal example aborts: ``` struct exception { }; int main() { try { throw exception{}; } catch (exception) { } catch (...) { } } ``` (Build with g++ exception.cpp && ./a.out) My GCC build is: ``` Using built-in specs. COLLECT_GCC=3D/usr/local/gcc-10.2/bin/g++-10.2 COLLECT_LTO_WRAPPER=3D/usr/local/gcc-10.2/libexec/gcc/x86_64-apple-darwin20= .2.0/10.2.0/lto-wrapper Target: x86_64-apple-darwin20.2.0 Configured with: ../gcc-10.2.0/configure --prefix=3D/usr/local/gcc-10.2 --enable-checking=3Drelease --enable-languages=3Dc,c++ --disable-multilib --with-sysroot=3D/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --program-suffix=3D-10.2 Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.2.0 (GCC)=20 ``` Backtrace of the binary when crashes is: ``` * frame #0: 0x00007fff20347462 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x00007fff20375610 libsystem_pthread.dylib`pthread_kill + 263 frame #2: 0x00007fff202c8720 libsystem_c.dylib`abort + 120 frame #3: 0x000000010048b00a libgcc_s.1.dylib`uw_init_context_1.cold + 5 frame #4: 0x0000000100488475 libgcc_s.1.dylib`_Unwind_RaiseException(exc=3D0x0000000100505760) at unwind.inc:93:3 frame #5: 0x00000001001382f7 libstdc++.6.dylib`__cxa_throw + 55 frame #6: 0x0000000100003f13 a.out`main at exception.cpp:5:19 frame #7: 0x00007fff20390621 libdyld.dylib`start + 1 ```=