svn commit: r271389 - head/usr.bin/truss

Andrew Turner andrew at FreeBSD.org
Wed Sep 10 13:07:02 UTC 2014


Author: andrew
Date: Wed Sep 10 13:07:01 2014
New Revision: 271389
URL: http://svnweb.freebsd.org/changeset/base/271389

Log:
  Stop accessing the saved stack pointer by looking past the end of the
  array of registers.
  
  Submitted by:	Michal Meloun <meloun at miracle.cz>

Modified:
  head/usr.bin/truss/arm-fbsd.c

Modified: head/usr.bin/truss/arm-fbsd.c
==============================================================================
--- head/usr.bin/truss/arm-fbsd.c	Wed Sep 10 12:55:34 2014	(r271388)
+++ head/usr.bin/truss/arm-fbsd.c	Wed Sep 10 13:07:01 2014	(r271389)
@@ -201,7 +201,7 @@ arm_syscall_entry(struct trussinfo *trus
 		 */
 		// XXX BAD constant used here
 		iorequest.piod_op = PIOD_READ_D;
-		iorequest.piod_offs = (void *)(regs.r[_REG_SP] +
+		iorequest.piod_offs = (void *)(regs.r_sp +
 		    4 * sizeof(uint32_t));
 		iorequest.piod_addr = &fsc->args[4];
 		iorequest.piod_len = (nargs - 4) * sizeof(fsc->args[0]);


More information about the svn-src-head mailing list