ptrace: detect if a stub process exited unexpectedly
PiperOrigin-RevId: 263880577
This commit is contained in:
parent
f7114e0a27
commit
2a1303357c
|
@ -354,6 +354,9 @@ func (t *thread) wait(outcome waitOutcome) syscall.Signal {
|
|||
continue // Spurious stop.
|
||||
}
|
||||
if stopSig == syscall.SIGTRAP {
|
||||
if status.TrapCause() == syscall.PTRACE_EVENT_EXIT {
|
||||
t.dumpAndPanic("wait failed: the process exited")
|
||||
}
|
||||
// Re-encode the trap cause the way it's expected.
|
||||
return stopSig | syscall.Signal(status.TrapCause()<<8)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue