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: OndÅej BÃlka <neleai at seznam dot cz>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 11 Feb 2014 17:58:29 +0100
- 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> <52FA4AC2 dot 1070400 at redhat dot com>
On Tue, Feb 11, 2014 at 05:07:30PM +0100, Florian Weimer wrote:
> On 02/11/2014 01:43 PM, OndÅej BÃlka wrote:
>
> >A more conservative solution is add assert in initialization to check
> >alignment. Following patch does that, should be same check added for
> >mutex/semaphores?
>
> I think the real issue here is our lack of error checking for the
> futex system call. strace on the test case shows this:
>
> [pid 12278] futex(0x6010cd, FUTEX_WAIT_PRIVATE, 1, NULL) = -1 EINVAL
> (Invalid argument)
>
That is also a problem. I would prefer to fail early in init to handle
cases like when wait lies in cold path and problem would manifest only rarely.
Checking return value of timedwait now would require to modify custom
assembly implementation. I will ask in separate thread why that
implementation is needed.