CVSROOT:        /cvs
Module name:    src
Changes by:     v...@cvs.openbsd.org    2019/02/02 07:34:09

Modified files:
        sys/arch/i386/i386: db_trace.c 

Log message:
Improve stack trace saving on i386:

* Replace unnecessary use of db_get_value() with direct access of
f_retaddr. The trace function assumes that the chain of frames
is good in terms of alignment and content.

* Replace the for loop with a while loop and drop the check
"frame != NULL" from the loop condition. The check is redundant with
the "!INKERNEL(frame)" condition. The code already assumes that the
initial frame is valid.

* Stop iteration if f_retaddr is a non-kernel address in order to
not save a user address at the end of the trace. This additionally
fixes a kernel crash that would happen if the user thread had
a broken frame pointer.

OK mpi@

Reply via email to