OSDN Git Service

extend the PTRDIFF_MAX size check to mremap
authorDaniel Micay <danielmicay@gmail.com>
Sat, 7 Nov 2015 15:40:26 +0000 (10:40 -0500)
committerDaniel Micay <danielmicay@gmail.com>
Thu, 19 Nov 2015 13:57:47 +0000 (08:57 -0500)
commitc22a7de798c4c0da30ad095a0c61a8f905eb9613
treea6dadbf1ceae2c3cb0811b6c91d1619d48fcd7c5
parent313632db574d101275206ca025d21a5a3cd62150
extend the PTRDIFF_MAX size check to mremap

This removes another way to obtain objects larger than PTRDIFF_MAX. The
only known remaining hole is now jemalloc's merging of virtual memory
spans.

Technically this could be wrapped in an __LP64__ ifndef since it can't
occur on 64-bit due to the 1:1 split. It doesn't really matter either
way.

Change-Id: Iab2af242b775bc98a59421994d87aca0433215bd
libc/bionic/mmap.cpp
libc/bionic/mremap.cpp
tests/sys_mman_test.cpp