diff options
author | 2018-11-30 01:54:17 +0000 | |
---|---|---|
committer | 2018-11-30 01:54:17 +0000 | |
commit | dc88bc7fab2471528230eb4caf044957ca3fcd08 (patch) | |
tree | b03fa5a7ee4d1ed66dc4cbd469c4b41bdf9239d1 | |
parent | Do not draw horizontal lines through vertical spans (diff) | |
download | wireguard-openbsd-dc88bc7fab2471528230eb4caf044957ca3fcd08.tar.xz wireguard-openbsd-dc88bc7fab2471528230eb4caf044957ca3fcd08.zip |
Fix test when using malloc_conf=J
ok otto@
-rw-r--r-- | regress/sys/kern/stackpivot/pagefault/stackpivot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/regress/sys/kern/stackpivot/pagefault/stackpivot.c b/regress/sys/kern/stackpivot/pagefault/stackpivot.c index 0d31e43f840..39e6ecd967b 100644 --- a/regress/sys/kern/stackpivot/pagefault/stackpivot.c +++ b/regress/sys/kern/stackpivot/pagefault/stackpivot.c @@ -17,6 +17,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdint.h> +#include <sys/mman.h> #include "../pivot.h" @@ -44,7 +45,7 @@ void unpivot() { int main() { /* allocate some memory to scan */ - scan = malloc(scansize); + scan = mmap(NULL, scansize, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); /* set up a rop chain on the real stack for syscalls */ size_t stack[10]; |