summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormortimer <mortimer@openbsd.org>2018-11-30 01:54:17 +0000
committermortimer <mortimer@openbsd.org>2018-11-30 01:54:17 +0000
commitdc88bc7fab2471528230eb4caf044957ca3fcd08 (patch)
treeb03fa5a7ee4d1ed66dc4cbd469c4b41bdf9239d1
parentDo not draw horizontal lines through vertical spans (diff)
downloadwireguard-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.c3
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];