[Bug 282445] Wrong stack() info in dtrace

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 31 Oct 2024 13:27:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282445

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org
             Status|New                         |Open

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
Could you please explain further why you think the value is incorrect?  I see
that the instruction in each case is the instruction *after* the call
instruction which leads to the next frame in the stack, which is an artifact of
the way stack unwinding is handled.

For example, if I trace something going through fork_trampoline(), the line
referenced by the stack frame is

1157         if (p->p_flag & P_KPROC) {

which is the next line of code after the function call.

On x86 this is probably not too easy to fix because the unwinder doesn't know
where instruction boundaries are.  We could just subtract 1 from the return
address and use that, but that'd be a bit weird.

> Because the pure hash value seems to be okay.

What do you mean by this?

-- 
You are receiving this mail because:
You are the assignee for the bug.