x86: randomize brk() and RLIMIT_DATA

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sami Farin
Date: Thursday, October 25, 2007 - 6:41 am

Would be neat if randomized brk and setrlimit(RLIMIT_DATA, ...)
worked in a predictable way:

$ gcc brk.c -fPIC -pie -m64;./a.out;./a.out;./a.out
sbrk=0x7f721b815000 main=0x7f721af04860
sbrk succeeded (brk=0x7f721b909240)
sbrk=0x7fc3d77e2000 main=0x7fc3d66fa860
sbrk failed: Cannot allocate memory (brk=0x7fc3d77e2000)
sbrk=0x7f05b0615000 main=0x7f05af76b860
sbrk failed: Cannot allocate memory (brk=0x7f05b0615000)

-- 
Do what you love because life is too short for anything else.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
x86: randomize brk() and RLIMIT_DATA, Sami Farin, (Thu Oct 25, 6:41 am)
Re: x86: randomize brk() and RLIMIT_DATA, Arjan van de Ven, (Thu Oct 25, 7:13 am)
Re: x86: randomize brk() and RLIMIT_DATA, Jiri Kosina, (Thu Oct 25, 7:46 am)
Re: x86: randomize brk() and RLIMIT_DATA, Sami Farin, (Thu Oct 25, 10:19 am)