]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: correct exception stack trace output
authorAlex Brainman <alex.brainman@gmail.com>
Tue, 21 Apr 2015 00:56:45 +0000 (10:56 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Mon, 18 May 2015 03:09:45 +0000 (03:09 +0000)
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 <rsc@golang.org>
src/runtime/signal_windows.go

index da8a1c58014b7a5fd7a173e6f85552204cc71025..b2fce5353482a13f617ef6afefbac68a5c52a77c 100644 (file)
@@ -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")