This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[Patch][BZ 14583] Fix prototype of sigsetjmp in pthread.h
- From: Jeff Law <law at redhat dot com>
- To: libc-alpha <libc-alpha at sourceware dot org>
- Date: Fri, 14 Sep 2012 11:30:11 -0600
- Subject: [Patch][BZ 14583] Fix prototype of sigsetjmp in pthread.h
pthread.h declares __sigsetjmp as:
extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask)
__THROW;
The problem is __sigsetjmp needs to be marked as non-leaf as is the case
in setjmp.h:
extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask)
__THROWNL;
Failure to mark __sigsetjmp correctly can result in GCC eliminating
stores that are not dead. See:
https://bugzilla.redhat.com/show_bug.cgi?id=857236
Attached is the obvious fix to pthread.h. However, one could ask the
question should pthread provide a prototype for sigsetjmp at all. If
you prefer to see the prototype be removed, I'm certainly willing to do
that too.
Attachment:
patch
Description: Text document