mirror of
https://github.com/golang/go
synced 2024-11-22 21:30:02 -07:00
in traceback, handle the case where we've called through a nil function pointer
R=rsc DELTA=7 (7 added, 0 deleted, 0 changed) OCL=18372 CL=18372
This commit is contained in:
parent
250ec1665a
commit
63f38d62ac
@ -25,6 +25,13 @@ traceback(uint8 *pc, uint8 *sp, void* r15)
|
||||
// store local copy of per-process data block that we can write as we unwind
|
||||
mcpy((byte*)&g, (byte*)r15, sizeof(G));
|
||||
|
||||
// if the PC is zero, it's probably due to a nil function pointer.
|
||||
// pop the failed frame.
|
||||
if(pc == nil) {
|
||||
pc = ((uint8**)sp)[0];
|
||||
sp += 8;
|
||||
}
|
||||
|
||||
counter = 0;
|
||||
name = "panic";
|
||||
for(;;){
|
||||
|
Loading…
Reference in New Issue
Block a user