From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2D08A3858C52; Wed, 10 Apr 2024 12:56:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D08A3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712753800; bh=YGfKD+uzcD9MGKosvlY+vK6gefOEkYiFaPVoMALRA3M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fzenqsZQLbNOFvPMXf7idWcqQGL7eVTvIWJvaLr/jzT9ZfqDKz23xZkfmNqjNwI3L vSn4WUbM6KJcJlkoRs8YjATorT76FE0FTkEagUA253dT/Ty9ll543tsi/HbMQ8fnjQ jj9RHWJ0hJ945YTeupWbUUpAPOSGedqaTROSQTWI= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop Date: Wed, 10 Apr 2024 12:56:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95989 --- Comment #24 from Jonathan Wakely --- > * testsuite/30_threads/jthread/95989.cc: New test. This testcase fails on FreeBSD 14: Starting program: /home/gcc/build/x86_64-unknown-freebsd14.0/libstdc++-v3/testsuite/95989.exe= =20 [New LWP 106082 of process 5331] Thread 2 received signal SIGABRT, Aborted. Sent by thr_kill() from pid 5331 and user 1001. [Switching to LWP 106082 of process 5331] thr_kill () at thr_kill.S:4 warning: 4 thr_kill.S: No such file or directory (gdb) bt #0 thr_kill () at thr_kill.S:4 #1 0x000000000042803f in __raise (s=3Ds@entry=3D6) at /usr/src/lib/libc/gen/raise.c:50 #2 0x000000000043c779 in abort () at /usr/src/lib/libc/stdlib/abort.c:64 #3 0x0000000000400cbc in uw_init_context_1 (context=3Dcontext@entry=3D0x7fffdfffdd50, outer_cfa=3Douter_cfa@entry=3D0x7fffdfffdf80, outer_ra=3D0x425546 ) at /mnt/gcc-src/libgcc/unwind-dw2.c:1336 #4 0x00000000004146a6 in _Unwind_ForcedUnwind (exc=3D0x80082d940, stop=3D0= x4256f0 , stop_argument=3Dstop_argument@entry=3D0x0) at /mnt/gcc-src/libgcc/unwind.inc:212 #5 0x0000000000425546 in thread_unwind () at /usr/src/lib/libthr/thread/thr_exit.c:172 #6 0x00000000004254af in _pthread_exit_mask (status=3D0x0, mask=3Dmask@ent= ry=3D0x0) at /usr/src/lib/libthr/thread/thr_exit.c:254 #7 0x000000000042541b in _Tthr_exit (status=3D0x19e62) at /usr/src/lib/libthr/thread/thr_exit.c:206 #8 0x0000000000424f2d in thread_start (curthread=3D0x80082d700) at /usr/src/lib/libthr/thread/thr_create.c:289 #9 0x0000000000000000 in ?? () Backtrace stopped: Cannot access memory at address 0x7fffdfffe000 (gdb) fr 3 #3 0x0000000000400cbc in uw_init_context_1 (context=3Dcontext@entry=3D0x7fffdfffdd50, outer_cfa=3Douter_cfa@entry=3D0x7fffdfffdf80, outer_ra=3D0x425546 ) at /mnt/gcc-src/libgcc/unwind-dw2.c:1336 1336 gcc_assert (code =3D=3D _URC_NO_REASON);=