diff options
| author | Russ Cox <rsc@golang.org> | 2010-09-28 20:50:00 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-09-28 20:50:00 -0400 |
| commit | 81041369b29b5f8910b559819512c57d3d86e034 (patch) | |
| tree | 87478414525cbbed6592f9355907f7871ffe05bb /src/pkg/runtime/linux | |
| parent | 649aab835fc8e0fef8e0456396378ed1495d41bd (diff) | |
| download | go-81041369b29b5f8910b559819512c57d3d86e034.tar.xz | |
runtime: fix build
On systems where the mmap succeeds
(e.g., sysctl -w vm.mmap_min_addr=0)
it changes the signal code delivered for a
nil fault from ``page not mapped'' to
``invalid permissions for page.''
TBR=r
CC=golang-dev
https://golang.org/cl/2294041
Diffstat (limited to 'src/pkg/runtime/linux')
| -rw-r--r-- | src/pkg/runtime/linux/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/linux/thread.c b/src/pkg/runtime/linux/thread.c index 47bf3428f7..f31838ea50 100644 --- a/src/pkg/runtime/linux/thread.c +++ b/src/pkg/runtime/linux/thread.c @@ -168,7 +168,7 @@ unlock(Lock *l) } void -destroylock(Lock *l) +destroylock(Lock*) { } @@ -282,7 +282,7 @@ sigpanic(void) printf("unexpected fault address %p\n", g->sigcode1); throw("fault"); case SIGSEGV: - if((g->sigcode0 == 0 || g->sigcode0 == SEGV_MAPERR) && g->sigcode1 < 0x1000) + if((g->sigcode0 == 0 || g->sigcode0 == SEGV_MAPERR || g->sigcode0 == SEGV_ACCERR) && g->sigcode1 < 0x1000) panicstring("invalid memory address or nil pointer dereference"); printf("unexpected fault address %p\n", g->sigcode1); throw("fault"); |
