diff options
author | Andrew Gerrand <adg@golang.org> | 2014-08-12 09:46:42 +1000 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2014-08-12 09:46:42 +1000 |
commit | 2f2a8d485cc709256e303a9836befcc336d165af (patch) | |
tree | 5e1ee77cf34f68f87e7bd5485d47e2151c5eabfa | |
parent | 4d52c1beeee5e5c9a78fcce5f796da1d48734181 (diff) | |
download | go-2f2a8d485cc709256e303a9836befcc336d165af.tar.gz |
[release-branch.go1.3] runtime: turn off 'unexpected return pc' print on arm traceback
??? CL 118670043 / 671fa8a9eb80
runtime: turn off 'unexpected return pc' print on arm traceback
It can happen legitimately if a profiling signal arrives at just the wrong moment.
It's harmless.
Fixes issue 8153.
LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews, iant, r
https://codereview.appspot.com/118670043
???
TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/127950044
-rw-r--r-- | src/pkg/runtime/traceback_arm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pkg/runtime/traceback_arm.c b/src/pkg/runtime/traceback_arm.c index d15244c2a..30f43d54c 100644 --- a/src/pkg/runtime/traceback_arm.c +++ b/src/pkg/runtime/traceback_arm.c @@ -128,9 +128,14 @@ runtime·gentraceback(uintptr pc0, uintptr sp0, uintptr lr0, G *gp, int32 skip, frame.lr = *(uintptr*)frame.sp; flr = runtime·findfunc(frame.lr); if(flr == nil) { - runtime·printf("runtime: unexpected return pc for %s called from %p\n", runtime·funcname(f), frame.lr); - if(callback != nil) + // This happens if you get a profiling interrupt at just the wrong time. + // In that context it is okay to stop early. + // But if callback is set, we're doing a garbage collection and must + // get everything, so crash loudly. + if(callback != nil) { + runtime·printf("runtime: unexpected return pc for %s called from %p\n", runtime·funcname(f), frame.lr); runtime·throw("unknown caller pc"); + } } } |