From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 846D13858434; Thu, 11 May 2023 12:05:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 846D13858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1683806731; bh=Ml7eWbCKVq0UjC2eH3GbiFM4mM/CAiGyAADtaLWcd3Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xUmqpXwWNjXtceTKrsEXAYq2CrGmFCWLHgE0QIkdpsbyG0Xal4gYlLl9OF+syGLx4 HUsM4K5Jvbyr1OMWoYz0WB5lzwLbx2fbEZF8NottX5/VZzutaeLw5hrB9aJx7e23JY OlrKC1pA36992/cGg3d9uT/XMS8Tx7nlytFZfhaQ= From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug nptl/25847] pthread_cond_signal failed to wake up pthread_cond_wait due to a bug in undoing stealing Date: Thu, 11 May 2023 12:05:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nptl X-Bugzilla-Version: 2.27 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: carlos at redhat dot com 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D25847 --- Comment #64 from Carlos O'Donell --- (In reply to Frank Barrus from comment #62) > (In reply to Malte Skarupke from comment #57) > > I submitted new patches with the fix: > >=20 > > https://sourceware.org/pipermail/libc-alpha/2023-May/147837.html >=20 > For the changes that remove g_refs, did you intend to change the condvar > structure size? The size of the public condvar structure is always maintained by the top-le= vel union (which takes into consideration the old linuxthreads implementation size): 75 typedef union 76 { 77 struct __pthread_cond_s __data; 78 char __size[__SIZEOF_PTHREAD_COND_T]; 79 __extension__ long long int __align; 80 } pthread_cond_t; > Shouldn't it be "unsigned int __unused[2];" at the end, to maintain binary > compatibility for shared libraries? We can drop the size because the top-level union maintains the size and alignment. >=20 > For reference from patch 5/9: >=20 > diff --git a/sysdeps/nptl/bits/thread-shared-types.h > b/sysdeps/nptl/bits/thread-shared-types.h > index 5653507e55..d1af98b215 100644 > --- a/sysdeps/nptl/bits/thread-shared-types.h > +++ b/sysdeps/nptl/bits/thread-shared-types.h > @@ -95,11 +95,11 @@ struct __pthread_cond_s > { > __atomic_wide_counter __wseq; > __atomic_wide_counter __g1_start; > - unsigned int __g_refs[2] __LOCK_ALIGNMENT; > - unsigned int __g_size[2]; > + unsigned int __g_size[2] __LOCK_ALIGNMENT; > unsigned int __g1_orig_size; > unsigned int __wrefs; > unsigned int __g_signals[2]; > + unsigned int __unused; > }; We don't even need an __unused here. --=20 You are receiving this mail because: You are on the CC list for the bug.=