From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C1933858D35; Fri, 10 Dec 2021 13:13:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C1933858D35 From: "mathieu.malaterre at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103629] Possible miscompilation triggered by pthread + exception Date: Fri, 10 Dec 2021 13:13:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mathieu.malaterre at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: In-Reply-To: References: 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: Fri, 10 Dec 2021 13:13:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103629 --- Comment #9 from Mathieu Malaterre = --- Compiling the reduce test case without pthread lead to some kind of excepti= on: ``` (gdb) bt full #0 __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:= 49 set =3D {__val =3D {0 , 8245935278387129975, 5908832823118463008, 0, 0}} pid =3D tid =3D ret =3D #1 0x00007ffff7bf9536 in __GI_abort () at abort.c:79 save_stage =3D 1 act =3D {__sigaction_handler =3D {sa_handler =3D 0x7ffff7d925e0 <_IO_2_1_stderr_>, sa_sigaction =3D 0x7ffff7d925e0 <_IO_2_1_stderr_>}, sa_m= ask =3D {__val =3D {140737350282933, 140737351591392, 140737351591392, 140737351591523, 140737351595200, 3432, 140737350279750, 11, = 1, 140737351591392, 93824992325712, 140737352586656, 140737488347968, 0, 140737350287193, 140737351591840}}, sa_flags =3D -135945484, sa_restorer =3D 0x7ffff7d927a0 } sigs =3D {__val =3D {32, 0, 0, 0, 17, 9223372036854775922, 14073735= 2422480, 140737350282933, 0, 140737350282933, 140737353353159, 140737351591392, 93824992325672, 140737351595200, 3432, 140737350279750}} #2 0x00007ffff7e4f87a in __gnu_cxx::__verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95 terminating =3D true t =3D #3 0x00007ffff7e5b04a in __cxxabiv1::__terminate (handler=3D) at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:48 No locals. #4 0x00007ffff7e5b0b5 in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:58 No locals. #5 0x00007ffff7e5b349 in __cxxabiv1::__cxa_throw (obj=3D, tinfo=3D0x7ffff7fb1530 , dest=3D0x7ffff7e85= 5a0 ) at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:95 globals =3D header =3D 0x55555556aeb0 #6 0x00007ffff7e525fa in std::__throw_system_error(int) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 No symbol table info available. #7 0x00007ffff7fc740f in std::call_once(std::once_flag&, Tree::treeType()::{lambda()#1}&&) (__once=3D..., __f=3D...) at /usr/include/c++/11/mutex:784 __e =3D -1 __callable =3D {____f =3D @0x7fffffffe3ff} __exec =3D {} ``` I am not able to reproduce gcc behavior using clang++ (again Debian sid version).=