This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/22351] Unaligned pthread_cond_t stopped working


https://sourceware.org/bugzilla/show_bug.cgi?id=22351

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Tulio Magno Quites Machado Filho from comment #0)
> Created attachment 10556 [details]
> Modified version of nptl/tst-cond1.c
> 
> The attached program works well on glibc <= 2.24.
> 
> It has the following packed structure:
> 
> struct thread_info_t
> {
>   pthread_mutex_t mut;
>   char c;
>   pthread_cond_t cond;
> };
> 
> If it's compiled on a glibc <= 2.24 machine and copied to a glibc >= 2.25
> machine, it aborts.
> 
> Confirmed on x86_64 and powerpc64le.

In 2.25 we had the new pthread_cond_t.

Are we missing explicit padding somewhere to avoid problems with user use of
pragma pack(1)?

I'm not entirely worried this isn't working, it's a bad idea to use pragma
pack(1) like this, and it should be avoided, but since it worked previously, we
probably need to audit any missing explicit padding?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]