summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/traceback_x86.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-02-01 08:34:41 -0800
committerRuss Cox <rsc@golang.org>2013-02-01 08:34:41 -0800
commitef949bdad8314d06b919565d21256226ed12561a (patch)
treeb9d1e10a104a7f78b0020c45e04a2b457442ba1b /src/pkg/runtime/traceback_x86.c
parent5456caf4e83a6a4d339b37d022b391762a4e4764 (diff)
downloadgo-ef949bdad8314d06b919565d21256226ed12561a.tar.gz
runtime: cgo-related fixes
* Separate internal and external LockOSThread, for cgo safety. * Show goroutine that made faulting cgo call. * Never start a panic due to a signal caused by a cgo call. Fixes issue 3774. Fixes issue 3775. Fixes issue 3797. R=golang-dev, iant CC=golang-dev https://codereview.appspot.com/7228081
Diffstat (limited to 'src/pkg/runtime/traceback_x86.c')
-rw-r--r--src/pkg/runtime/traceback_x86.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/runtime/traceback_x86.c b/src/pkg/runtime/traceback_x86.c
index 180accb10..798be388f 100644
--- a/src/pkg/runtime/traceback_x86.c
+++ b/src/pkg/runtime/traceback_x86.c
@@ -207,6 +207,11 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *gp, int32 skip, uintptr
void
runtime·traceback(byte *pc0, byte *sp, byte*, G *gp)
{
+ if(gp->status == Gsyscall) {
+ // Override signal registers if blocked in system call.
+ pc0 = gp->sched.pc;
+ sp = (byte*)gp->sched.sp;
+ }
runtime·gentraceback(pc0, sp, nil, gp, 0, nil, 100);
}