diff options
Diffstat (limited to 'support/support_stack_alloc.c')
-rw-r--r-- | support/support_stack_alloc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/support/support_stack_alloc.c b/support/support_stack_alloc.c index 5e576be..132e7b4 100644 --- a/support/support_stack_alloc.c +++ b/support/support_stack_alloc.c @@ -64,11 +64,10 @@ support_stack_alloc (size_t size) MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE|MAP_STACK, -1); /* Some architecture still requires executable stack for the signal return - trampoline, although PF_X could be overridden if PT_GNU_STACK is present. - However since glibc does not export such information with a proper ABI, - it uses the historical permissions. */ - int prot = PROT_READ | PROT_WRITE - | (DEFAULT_STACK_PERMS & PF_X ? PROT_EXEC : 0); + trampoline, although PROT_EXEC could be overridden if PT_GNU_STACK is + present. However since glibc does not export such information with a + proper ABI, it uses the historical permissions. */ + int prot = DEFAULT_STACK_PROT_PERMS; xmprotect (alloc_base + guardsize, stacksize, prot); memset (alloc_base + guardsize, 0xA5, stacksize); return (struct support_stack) { alloc_base + guardsize, stacksize, guardsize }; |