diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-04-17 21:59:10 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-04-17 21:59:10 +0000 |
commit | 46f120ca7bc8b4a49c0d5a596b85aeca4a254698 (patch) | |
tree | bbe0d056f0d61ee984030d254a3e9e60e08deddc | |
parent | 759fde68ea9800e959a5ba44075b304206fff92a (diff) | |
download | gcc-46f120ca7bc8b4a49c0d5a596b85aeca4a254698.zip gcc-46f120ca7bc8b4a49c0d5a596b85aeca4a254698.tar.gz gcc-46f120ca7bc8b4a49c0d5a596b85aeca4a254698.tar.bz2 |
re PR go/65798 (runtime.Caller returns ok=true when return data is invalid)
PR go/65798
runtime: In Caller don't return ok == true if PC == 0.
GCC PR 65798 reports that this can happen in some cases.
From-SVN: r222204
-rw-r--r-- | libgo/runtime/go-caller.c | 2 |
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; |