On Thu, 26 Mar 2009, Indu Bhagat wrote:
I have a question regarding the "virtual addresses" returned by the malloc call. When I run the same binary with the same input (implying that the program takes the same path), and pmap dump is the same across program runs (except stack), can something be said about the returned virtual addresses? Given that the process maps are identical (except stack), will they be the same? The behavior I am noticing is that they are the same (I ran the program many times). But this is not sufficient to say that they " will always " be the same. My program does not depend on the returned addresses, its only for some profiling purposes that the answer matters in this context. I have an OpenSuse kernel 2.6.20 with libc version 2.5.
You can't rely on that. I have added full address space randomization (including the randomized location of .text segment for PIE binaries and mmap base for all binaries) to newer kernels for certain architectures. -- Jiri Kosina SUSE Labs -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org