aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgo/runtime/go-caller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c
index ad151ec..ed6fd10 100644
--- a/libgo/runtime/go-caller.c
+++ b/libgo/runtime/go-caller.c
@@ -166,7 +166,7 @@ Caller (int skip)
runtime_memclr (&ret, sizeof ret);
n = runtime_callers (skip + 1, &loc, 1, false);
- if (n < 1)
+ if (n < 1 || loc.pc == 0)
return ret;
ret.pc = loc.pc;
ret.file = loc.filename;