Disable a couple tests that use sbrk(2).
Don't build brk(2) and sbrk(2) symbols in libc.
Remove declerations for brk(2) and sbrk(2).
Differential D5600
Disable use of sbrk(2). brooks on Mar 10 2016, 4:15 AM. Authored by Tags None Referenced Files
Details
Disable a couple tests that use sbrk(2). Don't build brk(2) and sbrk(2) symbols in libc. Remove declerations for brk(2) and sbrk(2).
Diff Detail
Event TimelineComment Actions This patch is not intended to be committed directly as it removes symbols that may not be removed. It is intended to be a patch to test the implications of removing sbrk. Comment Actions Could the parts of the patch that just change the #define to stop using sbrk be committed? Comment Actions The sbrk interface is lousy. It defeats ASLR, effectively makes freeing memory impossible, and encourages fragmentation. It's also impossible to implement on memory safe platforms like CHERI. Most users are using it out of inertia and are either using it as a completely non-functional way to infer heap size or could be served by a trival mmap based implementation. I'm hoping that we can cut the cord for new platforms (arm64 and risc-v). I'm planning to implement trivial implementations as required.
Comment Actions The config.h ones probably should be committed since those uses are pointless. I'm less confident of the jemalloc change, but almost certainly if we do import an ASLR implementation. Comment Actions We've done the most important bits of as part of removing sbrk and brk from arm64 and riscv. We should do the toolchain bits eventually. |