diff options
| author | Ian Lance Taylor <iant@golang.org> | 2017-12-08 16:05:22 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-12-09 01:21:32 +0000 |
| commit | 29cb57c5bda37f1c5a58b315fc5619835cc53467 (patch) | |
| tree | 07d34e0838d8504c1d9a470ab78c58b33ed707e4 /src/runtime/testdata | |
| parent | 840fad13ecd974efebe4fa25d4e444df5ec8041d (diff) | |
| download | go-29cb57c5bda37f1c5a58b315fc5619835cc53467.tar.xz | |
runtime: don't use MAP_STACK in SigStack test
On DragonFly mmap with MAP_STACK returns the top of the region, not
the bottom. Rather than try to cope, just don't use the flag anywhere.
Fixes #23061
Change-Id: Ib5df4dd7c934b3efecfc4bc87f8989b4c37555d7
Reviewed-on: https://go-review.googlesource.com/83035
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/testdata')
| -rw-r--r-- | src/runtime/testdata/testprogcgo/sigstack.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/runtime/testdata/testprogcgo/sigstack.go b/src/runtime/testdata/testprogcgo/sigstack.go index e30a5592dc..492dfeff7f 100644 --- a/src/runtime/testdata/testprogcgo/sigstack.go +++ b/src/runtime/testdata/testprogcgo/sigstack.go @@ -17,15 +17,11 @@ package main #include <stdlib.h> #include <sys/mman.h> -#ifndef MAP_STACK -#define MAP_STACK 0 -#endif - extern void SigStackCallback(); static void* WithSigStack(void* arg __attribute__((unused))) { // Set up an alternate system stack. - void* base = mmap(0, SIGSTKSZ, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON|MAP_STACK, -1, 0); + void* base = mmap(0, SIGSTKSZ, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); if (base == MAP_FAILED) { perror("mmap failed"); abort(); |
