svn commit: r291057 - head/sys/cddl/dev/dtrace/amd64

Mark Johnston markj at FreeBSD.org
Thu Nov 19 05:33:16 UTC 2015


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) {


More information about the svn-src-head mailing list