On 11/16/09, sudheer.divaka...@wipro.com <sudheer.divaka...@wipro.com> wrote:
>
> If we disassemble the binary 'bad', we can see that AsmFn2 is followed by
> the function Main. As before, once the control enters AsmFn2, since it
> doesn't have a ret statement, it would execute the instructions below and
> would enter the function main & that would again call  AsmFn1->AsmFn2->main
> and this process continues and I think after a point of time, stack
> corruption happens.
>

I second and support Sudheer nice analysis. If we modify test.c to
count how many times main() was called, I saw that it was called
174589 times before it hit segfault. Stack overflow I believe, since
it likely hit stack size limit (set via getrlimit())
-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to