summaryrefslogtreecommitdiff
path: root/posix/tst-mmap-offset.c
AgeCommit message (Collapse)Author
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-08-28Fix wordsize-32 mmap offset for negative value (BZ#18877)Adhemerval Zanella
This patch fixes the default wordsize-32 mmap implementation offset calculation for negative values. Current code uses signed shift operation to calculate the multiple size to use with syscall and it is implementation defined. Change it to use a division base on mmap page size (default being as before, 4096). Tested on armv7hf. [BZ #18877] * posix/Makefile (tests): Add tst-mmap-offset. * posix/tst-mmap.c: New file. * sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c (__mmap): Fix offset calculation for negative values.