This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/16549] pthread_cond_wait and pthread_cond_timedwait do not suspend the calling thread
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 11 Feb 2014 17:53:09 +0000
- Subject: [Bug nptl/16549] pthread_cond_wait and pthread_cond_timedwait do not suspend the calling thread
- Auto-submitted: auto-generated
- References: <bug-16549-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16549
--- Comment #7 from Rich Felker <bugdal at aerifal dot cx> ---
BTW I think this general class of bugs should be filed as a bug against GCC:
misaligned packed structure members should have the fact that they're
misaligned encoded as part of their type, so that applying the address-of
operator to them yields a pointer type that's not compatible with the standard
pointer type. Then, pthread_cond_wait(&packed_struct.misaligned_cond, ...)
would yield a compile-time error due to incompatible pointer types. Likewise,
the compile's format string warnings could catch the mismatched pointer type in
scanf("%d", &packed_struct.foo).
--
You are receiving this mail because:
You are on the CC list for the bug.