mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Intitialize the frame pointer and return pc of a new process created
in cpu_fork(). This prevents the stack tracer from running past the end of the stack (only the pc is checked in that case), which became fatal when db_print_backtrace() was introduced and called outside of ddb. Additional testing: kris
This commit is contained in:
parent
1f4408f321
commit
252cc8f6b2
1 changed files with 2 additions and 0 deletions
|
|
@ -300,6 +300,8 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
|
|||
fp->fr_local[0] = (u_long)fork_return;
|
||||
fp->fr_local[1] = (u_long)td2;
|
||||
fp->fr_local[2] = (u_long)tf;
|
||||
/* Terminate stack traces at this frame. */
|
||||
fp->fr_pc = fp->fr_fp = 0;
|
||||
pcb2->pcb_sp = (u_long)fp - SPOFF;
|
||||
pcb2->pcb_pc = (u_long)fork_trampoline - 8;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue