From e544bee1ddf4a2869221b68ef8cec6c97b6d827b Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Tue, 21 Apr 2015 10:56:45 +1000 Subject: [PATCH] runtime: correct exception stack trace output It is misleading when stack trace say: signal arrived during cgo execution but we are not in cgo call. Change-Id: I627e2f2bdc7755074677f77f21befc070a101914 Reviewed-on: https://go-review.googlesource.com/9190 Reviewed-by: Russ Cox --- src/runtime/signal_windows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/signal_windows.go b/src/runtime/signal_windows.go index da8a1c5801..b2fce53534 100644 --- a/src/runtime/signal_windows.go +++ b/src/runtime/signal_windows.go @@ -131,7 +131,9 @@ func lastcontinuehandler(info *exceptionrecord, r *context, gp *g) int32 { print("PC=", hex(r.ip()), "\n") if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 { - print("signal arrived during cgo execution\n") + if iscgo { + print("signal arrived during external code execution\n") + } gp = _g_.m.lockedg } print("\n")