Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 2019 23:35: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: r345355 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall
Message-ID:  <201903202335.x2KNZFvd017074@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Mar 20 23:35:15 2019
New Revision: 345355
URL: https://svnweb.freebsd.org/changeset/base/345355

Log:
  Ensure that we use a 64-bit value for the last mmap() argument.
  
  When using __syscall(2), the offset argument is passed on the stack on
  amd64.  Previously only 32 bits were written, so the upper 32 bits were
  garbage and could cause the test to fail.
  
  MFC after:	3 days
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c	Wed Mar 20 23:32:37 2019	(r345354)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c	Wed Mar 20 23:35:15 2019	(r345355)
@@ -35,7 +35,8 @@ int
 main(int argc, char **argv)
 {
 	for (;;) {
-		(void) __syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678);
+		(void) __syscall(SYS_mmap, NULL, (size_t)1, 2, 3, -1,
+		    (off_t)0x12345678);
 	}
 
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903202335.x2KNZFvd017074>