aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2013-03-22 17:32:04 -0700
committerIan Lance Taylor <iant@golang.org>2013-03-22 17:32:04 -0700
commitfb7f217fe76f46aedb9cd017c79412600c11f959 (patch)
tree3b9661e273c68c33596a5dec2237fa0c94383f48 /src/pkg/runtime
parent259e8cec7ad3d7c0031c53d70442fafdbdabe528 (diff)
downloadgo-fb7f217fe76f46aedb9cd017c79412600c11f959.tar.xz
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://golang.org/cl/7906045
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/os_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/os_linux.c b/src/pkg/runtime/os_linux.c
index 8aa4c3d35d..e4ae1a5d80 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: