From: Rich Felker Date: Sat, 8 Dec 2012 03:33:11 +0000 (-0500) Subject: page-align initial brk value used by malloc in shared libc X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=b8ccf8e46bab6ee9d63a6e392c3b33b9aa89255c;hp=b8ccf8e46bab6ee9d63a6e392c3b33b9aa89255c page-align initial brk value used by malloc in shared libc this change fixes an obscure issue with some nonstandard kernels, where the initial brk syscall returns a pointer just past the end of bss rather than the beginning of a new page. in that case, the dynamic linker has already reclaimed the space between the end of bss and the page end for use by malloc, and memory corruption (allocating the same memory twice) will occur when malloc again claims it on the first call to brk. ---