summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc <devnull@localhost>1998-05-07 05:07:25 +0000
committerwtc <devnull@localhost>1998-05-07 05:07:25 +0000
commitd5ecb05e6d8df55f7ea9d43b9f82abccc368bc56 (patch)
treeee918e27606294b97eb39a56df79b021431b31bd
parentc33e67cbbe9cda68559d6c7528d769bf0b3f5baa (diff)
downloadnspr-hg-d5ecb05e6d8df55f7ea9d43b9f82abccc368bc56.tar.gz
On Alpha Linux, the mmap'd stack needs to be made executable because
setjmp/signal seem to put machine instructions on the stack. This fix is contributed by gatgul@voicenet.com (Uncle George).
-rw-r--r--pr/src/md/unix/unix.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pr/src/md/unix/unix.c b/pr/src/md/unix/unix.c
index fef2f660..1eaf3163 100644
--- a/pr/src/md/unix/unix.c
+++ b/pr/src/md/unix/unix.c
@@ -2804,6 +2804,14 @@ from_heap:
}
prot = PROT_READ|PROT_WRITE;
+ /*
+ * On Alpha Linux, the user-level thread stack needs
+ * to be made executable because longjmp/signal seem
+ * to put machine instructions on the stack.
+ */
+#if defined(LINUX) && defined(__alpha)
+ prot |= PROT_EXEC;
+#endif
rv = mmap((vaddr != 0) ? vaddr : lastaddr, size, prot,
_MD_MMAP_FLAGS,
_pr_zero_fd, 0);