1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-06 18:29:47 +00:00

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
This commit is contained in:
Mark Johnston 2019-03-20 23:35:15 +00:00
parent bda54b8f96
commit 5ee81b26a8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345355

View File

@ -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);