Skip to content
Commit d3573f61 authored by Adhemerval Zanella's avatar Adhemerval Zanella Committed by Adhemerval Zanella
Browse files

Fix wordsize-32 mmap offset for negative value (BZ#18877)

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.
parent 8c17cb1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment