Date: Thu, 19 Nov 2015 05:33:15 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291057 - head/sys/cddl/dev/dtrace/amd64 Message-ID: <201511190533.tAJ5XFja014416@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Nov 19 05:33:15 2015 New Revision: 291057 URL: https://svnweb.freebsd.org/changeset/base/291057 Log: Fix a bug in the amd64 dtrace_getarg() implementation: when unwinding the stack, take into account the copy of rsi pushed between the breakpoint trapframe and the dtrace_invop frame. Prior to r287644, this was covered by the fact that sizeof(struct amd64_frame) was 24 rather than 16. Reported by: smh Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Thu Nov 19 04:41:16 2015 (r291056) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Thu Nov 19 05:33:15 2015 (r291057) @@ -385,8 +385,8 @@ dtrace_getarg(int arg, int aframes) * we're seeking is passed in regsiters, we can just * load it directly. */ - struct trapframe *tf = - (struct trapframe *)((uintptr_t)&fp[1]); + struct trapframe *tf = (struct trapframe *) + ((uintptr_t)&fp[1] + sizeof(uintptr_t)); if (arg <= inreg) { switch (arg) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511190533.tAJ5XFja014416>