]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: adjust traceback for new preemptive reality
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 11 Jul 2013 17:52:20 +0000 (13:52 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 11 Jul 2013 17:52:20 +0000 (13:52 -0400)
Currently it crashes as follows:
fatal error: unknown pc
...
goroutine 71698 [runnable]:
runtime.racegoend()
        src/pkg/runtime/race.c:171
runtime.goexit()
        src/pkg/runtime/proc.c:1276 +0x9
created by runtime_test.testConcurrentReadsAfterGrowth
        src/pkg/runtime/map_test.go:264 +0x332

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/10674047

src/pkg/runtime/traceback_arm.c
src/pkg/runtime/traceback_x86.c

index b91017eea5b14e4939902d111350dc75d19b9bd0..599f6093eb770241dd44b642c826de757059a239 100644 (file)
@@ -164,7 +164,7 @@ runtime·gentraceback(uintptr pc0, uintptr sp0, uintptr lr0, G *gp, int32 skip,
                waspanic = f->entry == (uintptr)runtime·sigpanic;
 
                // Do not unwind past the bottom of the stack.
-               if(frame.pc == (uintptr)runtime·goexit || f->entry == (uintptr)runtime·mstart || f->entry == (uintptr)_rt0_go)
+               if(f->entry == (uintptr)runtime·goexit || f->entry == (uintptr)runtime·mstart || f->entry == (uintptr)_rt0_go)
                        break;
 
                // Unwind to next frame.
index a6c6ebcae9797ec1b1e33b9c52270412440fdf4d..3a9b864e89a2e717e249387e77c70ee3f9129df8 100644 (file)
@@ -170,7 +170,7 @@ runtime·gentraceback(uintptr pc0, uintptr sp0, uintptr lr0, G *gp, int32 skip,
                        frame.fp += 2*sizeof(uintptr);
 
                // Do not unwind past the bottom of the stack.
-               if(frame.pc == (uintptr)runtime·goexit || f->entry == (uintptr)runtime·mstart || f->entry == (uintptr)_rt0_go)
+               if(f->entry == (uintptr)runtime·goexit || f->entry == (uintptr)runtime·mstart || f->entry == (uintptr)_rt0_go)
                        break;
 
                // Unwind to next frame.