aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--libgo/go/runtime/signal_gccgo.go9
-rw-r--r--libgo/go/runtime/signal_sigtramp.go3
-rw-r--r--libgo/runtime/go-signal.c6
4 files changed, 16 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 9634f00..1fe9dec 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-3c8d91cff0ad3d233ebd268f88a3749d38a0aac1
+eb716b515356166d3177e6244619be5901f31162
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/go/runtime/signal_gccgo.go b/libgo/go/runtime/signal_gccgo.go
index 0ecafcc..321c619 100644
--- a/libgo/go/runtime/signal_gccgo.go
+++ b/libgo/go/runtime/signal_gccgo.go
@@ -47,7 +47,14 @@ type sigctxt struct {
ctxt unsafe.Pointer
}
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
+func (c *sigctxt) sigcode() uint64 {
+ if c.info == nil {
+ // This can happen on Solaris 10. We don't know the
+ // code, just avoid a misleading value.
+ return _SI_USER + 1
+ }
+ return uint64(c.info.si_code)
+}
//go:nosplit
func sigblock() {
diff --git a/libgo/go/runtime/signal_sigtramp.go b/libgo/go/runtime/signal_sigtramp.go
index 67b9e67..667d5fe 100644
--- a/libgo/go/runtime/signal_sigtramp.go
+++ b/libgo/go/runtime/signal_sigtramp.go
@@ -29,7 +29,8 @@ func sigtrampgo(sig uint32, info *_siginfo_t, ctx unsafe.Pointer) {
// get here anyhow.
return
}
- badsignal(uintptr(sig), &sigctxt{info, ctx})
+ c := sigctxt{info, ctx}
+ badsignal(uintptr(sig), &c)
return
}
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index 9ee02a3..b844dc5 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -187,7 +187,11 @@ getSiginfo(siginfo_t *info, void *context __attribute__((unused)))
Location loc[1];
int32 n;
- ret.sigaddr = (uintptr)(info->si_addr);
+ if (info == nil) {
+ ret.sigaddr = 0;
+ } else {
+ ret.sigaddr = (uintptr)(info->si_addr);
+ }
ret.sigpc = 0;
// There doesn't seem to be a portable way to get the PC.