This is the mail archive of the libc-alpha@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]

Re: glibc 2.21 - Machine maintainers, please test your machines.


Torvald Riegel <triegel@redhat.com> writes:

> On Mon, 2015-01-26 at 16:03 +0100, Andreas Schwab wrote:
>> The compiler can simplify operations based on the known alignment of
>> objects.  This is like any other undefined behaviour.
>
> Is your concern regarding glibc code (ie, sem_*()) or code outside
> glibc?

It doesn't matter.  If you have a type with 8 byte alignment, but the
object has only 4 byte alignment you get undefined behaviour.

> For code outside of glibc, I'm not sure something can actually happen.
> If an application picks up the new semaphore.h, sem_t will be
> 8B-aligned.  If not, then not.  I don't think this can be partially
> 8B/4B-aligned, or can it?

You are changing the ABI.  Anything can happen.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


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