summaryrefslogtreecommitdiff
path: root/malloc/arena.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-05 02:09:04 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-06-05 02:09:04 +0400
commit415ee7d6e47dcb3e0906a7bebc6d52ab8ed899da (patch)
treef7773ad82023c8616b339d84faa4bb7643af0311 /malloc/arena.c
parent3cc0cd4c5b3bed6f7d9aff26322d505785e11aa9 (diff)
downloadglibc-415ee7d6e47dcb3e0906a7bebc6d52ab8ed899da.tar.gz
Merged changes from kopensolaris-gnu project
http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu/glibc.git Commits from 9157319 to bad8ac8. This is only partial patch, some changes to not apply and will be resovled and committed next.
Diffstat (limited to 'malloc/arena.c')
-rw-r--r--malloc/arena.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 33c4ff37a7..be25386c78 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -59,7 +59,7 @@ typedef struct _heap_info {
struct _heap_info *prev; /* Previous heap. */
size_t size; /* Current size in bytes. */
size_t mprotect_size; /* Size in bytes that has been mprotected
- PROT_READ|PROT_WRITE. */
+ PROT_READ|PROT_WRITE|MALLOC_PROT_EXEC. */
/* Make sure the following data is properly aligned, particularly
that sizeof (heap_info) + 2 * SIZE_SZ is a multiple of
MALLOC_ALIGNMENT. */
@@ -599,7 +599,7 @@ grow_heap(heap_info *h, long diff)
if((unsigned long) new_size > h->mprotect_size) {
if (__mprotect((char *)h + h->mprotect_size,
(unsigned long) new_size - h->mprotect_size,
- PROT_READ|PROT_WRITE) != 0)
+ PROT_READ|PROT_WRITE|MALLOC_PROT_EXEC) != 0)
return -2;
h->mprotect_size = new_size;
}