The stack changes (e.g. The return address for the mmap call) after you copied it. I can think of 2 possible ways around this.
The stack changes (e.g. The return address for the mmap call) after you copied it. I can think of 2 possible ways around this: Write asm that doesn't need the stack to perform the new mapping. Call into a function with some huge local data so that the working stack is on a different page from the pages you're mapping over.
Then, you could map over the lower addresses with a second call to mmap once this function returns. Whatever you do, this is a horrible hack and probably a bad idea..
Yeah, I think that's the problem. I did the latter of your two strategies in an earlier draft, which worked, but I had been trying to simplify my code--and forgot the reason for that particular requirement. – Amittai Aviram Dec 12 '10 at 22:12 2 @Amittai Aviram: You could use makecontext() to do the stack copy and mmap in a different, temporary, context which uses a different stack.
– caf Dec 12 '10 at 23:51 You could also use a signal handler with alternate signal stack to avoid the issue of clobbering the stack under running code. – R.. Sep 28 at 0:08.
In any case, the symptom suggests that you've managed to map in over the top of the stack, destroying the return pointer.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.