This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]