This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][BZ #16549] Add sanity check for condvar alignment.
- From: Rich Felker <dalias at aerifal dot cx>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Mike Frysinger <vapier at gentoo dot org>, libc-alpha at sourceware dot org
- Date: Sun, 16 Feb 2014 11:55:11 -0500
- Subject: Re: [RFC][BZ #16549] Add sanity check for condvar alignment.
- Authentication-results: sourceware.org; auth=none
- References: <20140211124346 dot GA31165 at domone dot podge> <20140211153502 dot GY15627 at brightrain dot aerifal dot cx> <20140211162638 dot GA31587 at domone dot podge> <3884564 dot i4Ap9r5n7l at vapier> <20140216115522 dot GA6073 at domone dot podge>
On Sun, Feb 16, 2014 at 12:55:22PM +0100, OndÅej BÃlka wrote:
> That is most of time not problem as a function will either work or
> crash.
This is not entirely true. On archs where the low bits are ignored in
pointers, passing a misaligned address will result in misinterpreting
(if reading) and corrupting (if writing) adjacent data.