|
From: Mark W. <mj...@re...> - 2015-08-18 17:08:32
|
On Tue, 2015-08-18 at 15:37 +0100, Tom Hughes wrote:
> On 18/08/15 15:34, Julian Seward wrote:
> > On 18/08/15 16:21, Rhys Kidd wrote:
> >> Seeing build failure with 'make check' on OS X as follows. Will get a
> >
> >> ./safe-pthread.h:29:19: error: token is not a valid binary operator in a
> >> preprocessor subexpression
> >> #if __GLIBC_PREREQ(2,20) && ( defined(__i386__) || defined(__x86_64__) )
> >> ~~~~~~~~~~~~~~^
> >
> > Yes, I imagine __GLIBC_PREREQ doesn't exist on OS X. What about this?
> >
> > #if defined(__GLIBC_PREREQ) \
> > && __GLIBC_PREREQ(2,20) && ( defined(__i386__) || defined(__x86_64__) )
> >
> > Will that fix it?
>
> Should do. Sorry, stole that from the main tc20 code without paying
> attention to all the humps it jumped through to define it on other
> platforms.
Do we really need the #if?
Can't we just always install the sigill handler?
Currently the test will fail on glibc < 2.20 since the backtrace looks
slightly different:
--- tc12_rwl_trivial.stderr.exp 2015-08-18 15:25:07.011729981 +0200
+++ tc12_rwl_trivial.stderr.out 2015-08-18 15:37:12.187446390 +0200
@@ -1,7 +1,7 @@
Reader-writer lock not locked by calling thread: rwlock 0x.........
at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?)
- by 0x........: safe_pthread_rwlock_unlock (safe-pthread.h:43)
+ by 0x........: safe_pthread_rwlock_unlock (safe-pthread.h:52)
by 0x........: main (tc12_rwl_trivial.c:29)
rwlock 0x........ was first observed at:
at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?)
If we just always installed the handler then the line would always be
the same.
Cheers,
M ark
|