diff options
author | Ian Lance Taylor <iant@golang.org> | 2013-03-22 17:32:04 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2013-03-22 17:32:04 -0700 |
commit | 641e7ae3e3f20b3d5438293a9215c1a6d4b18293 (patch) | |
tree | 1ae0585fefa624d1a88f2203eb0f467fb079be39 /src/pkg/runtime/os_linux.c | |
parent | c4ae19b90d47e492c6195723b70a5313d111b1dd (diff) | |
download | go-641e7ae3e3f20b3d5438293a9215c1a6d4b18293.tar.gz |
runtime: correct misplaced right brace in Linux SIGBUS handling
I'm not sure how to write a test for this. The change in
behaviour is that if you somehow get a SIGBUS signal for an
address >= 0x1000, the program will now crash rather than
calling panic. As far as I know, on x86 GNU/Linux, the only
way to get a SIGBUS (rather than a SIGSEGV) is to set the
stack pointer to an invalid value.
R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7906045
Diffstat (limited to 'src/pkg/runtime/os_linux.c')
-rw-r--r-- | src/pkg/runtime/os_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/os_linux.c b/src/pkg/runtime/os_linux.c index 8aa4c3d35..e4ae1a5d8 100644 --- a/src/pkg/runtime/os_linux.c +++ b/src/pkg/runtime/os_linux.c @@ -225,8 +225,8 @@ runtime·sigpanic(void) if(g->sigcode0 == BUS_ADRERR && g->sigcode1 < 0x1000) { if(g->sigpc == 0) runtime·panicstring("call of nil func value"); - } runtime·panicstring("invalid memory address or nil pointer dereference"); + } runtime·printf("unexpected fault address %p\n", g->sigcode1); runtime·throw("fault"); case SIGSEGV: |