On Mon, Oct 20, 2008 at 04:35:06PM +0200, jehan wrote:
>> From the program's point of view, all memory space is his, some
>> addresses are allocated, some not. But all the memory (eg. from 0 to
>> 0xffffffff on a 32bits arch) is potentially his.
> Ok, so what I understand here is that you confirm that the program
> won't segfault as long as I am not accessing another program's
> allocated memory, even if I get out my own allocated memory. Is that
It was my understanding that as soon as you try and read / write to any
memory that is not yours, you get a segfault. Regardless weather the
memory is used by another program or not. This is a "safety" feature of
the kernel / glibc, and is generally viewed as a good thing.
I'm more of a mathematician than a C programmer, so might be totally off
Twenty Ways To Maintain A Healthy Level of Insanity
4. Put your garbage can on your desk and label it "In".