Fix FS#12559: sigaltstack threads fortify failure
Ubuntu defines _FORTIFY_SOURCE=2, which causes glibc longjmp() to check sp when gcc optimization is enabled. The check does not allow longjmp() to be used for switching threads and results in a "longjmp causes uninitialized stack frame" error. This disables the check. Change-Id: Idb8877b43ce711df880ca88875ba5477445a577a
This commit is contained in:
parent
1230a45a65
commit
f4954c4a9b
1 changed files with 9 additions and 0 deletions
|
@ -19,6 +19,15 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SIGALTSTACK_THREADS
|
||||
/*
|
||||
* The sp check in glibc __longjmp_chk() will cause
|
||||
* a fatal error when switching threads via longjmp().
|
||||
*/
|
||||
#undef _FORTIFY_SOURCE
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include "thread.h"
|
||||
|
|
Loading…
Reference in a new issue