Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2024 13:27:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 282445] Wrong stack() info in dtrace
Message-ID:  <bug-282445-227-yqFmobuk3Z@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-282445-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

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.

help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-282445-227-yqFmobuk3Z>