properly access mcontext_t program counter in cancellation handler
authorRich Felker <dalias@aerifal.cx>
Mon, 2 Nov 2015 17:39:28 +0000 (12:39 -0500)
committerRich Felker <dalias@aerifal.cx>
Mon, 2 Nov 2015 17:41:49 +0000 (12:41 -0500)
commitcb1bf2f321b45a06447133b3db00621b7300c456
tree50518595b1f221270ec0a209b5252c85d4ba140c
parentfead7e3fc04729b4cc8a5feec4a172b389395212
properly access mcontext_t program counter in cancellation handler

using the actual mcontext_t definition rather than an overlaid pointer
array both improves correctness/readability and eliminates some ugly
hacks for archs with 64-bit registers bit 32-bit program counter.

also fix UB due to comparison of pointers not in a common array
object.
arch/aarch64/pthread_arch.h
arch/arm/pthread_arch.h
arch/i386/pthread_arch.h
arch/microblaze/pthread_arch.h
arch/mips/pthread_arch.h
arch/or1k/pthread_arch.h
arch/powerpc/pthread_arch.h
arch/sh/pthread_arch.h
arch/x32/pthread_arch.h
arch/x86_64/pthread_arch.h
src/thread/pthread_cancel.c