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
This commit is contained in:
parent
759fde68ea
commit
46f120ca7b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue