diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-11 14:53:56 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-11 15:01:19 -0800 |
commit | 8dc2499aa62f768c6395c9754b8cabc1ce25c494 (patch) | |
tree | 43d7fd2bbfd7ad8c9625a718a5e8718889351994 /libgo/runtime | |
parent | 9a56779dbc4e2d9c15be8d31e36f2f59be7331a8 (diff) | |
download | gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.zip gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.gz gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.bz2 |
libgo: update to Go1.18beta2
gotools/
* Makefile.am (go_cmd_cgo_files): Add ast_go118.go
(check-go-tool): Copy golang.org/x/tools directories.
* Makefile.in: Regenerate.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/go-signal.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c index d30d160..0cb9030 100644 --- a/libgo/runtime/go-signal.c +++ b/libgo/runtime/go-signal.c @@ -62,6 +62,7 @@ sigtramp(int sig, siginfo_t *info, void *context) G *gp; void *stack_context[10]; void *stack; + void *find_stack; size_t stack_size; void *next_segment; void *next_sp; @@ -91,9 +92,15 @@ sigtramp(int sig, siginfo_t *info, void *context) __splitstack_getcontext(&stack_context[0]); - stack = __splitstack_find_context((void*)(&gp->m->gsignal->stackcontext[0]), - &stack_size, &next_segment, - &next_sp, &initial_sp); + find_stack = + __splitstack_find_context((void*)(&gp->m->gsignal->stackcontext[0]), + &stack_size, &next_segment, + &next_sp, &initial_sp); + stack = find_stack; + if (stack == NULL) { + stack = gp->m->gsignalstack; + stack_size = gp->m->gsignalstacksize; + } // If some non-Go code called sigaltstack, adjust. sp = (uintptr)(&stack_size); @@ -113,7 +120,7 @@ sigtramp(int sig, siginfo_t *info, void *context) // Unfortunately __splitstack_find_context will return NULL // when it is called on a context that has never been used. // There isn't much we can do but assume all is well. - if (stack != NULL) { + if (find_stack != NULL) { // Here the gc runtime adjusts the gsignal // stack guard to match the values returned by // sigaltstack. Unfortunately we have no way |