Re: linux crashed with unchecked malloc ??

vinny (vinny@innomedia.soft.net)
Wed, 15 Dec 1999 14:53:54 +0530


hi,
The segfault was something that I defintely expected. It should and did
on my system. But when a program takes up too many resources the kernel is
supposed to kill it right?. Then why did the kernel fail to do so in the second
system?.
Apart from that how did the ext2 fs got corrupted becuase of a memory
leak. I defintely did not expect that. It was a deliberate code to see how
linux handles it , but fs corruption was some thing that blew the hell out of
me. I ran fsck to fix it , but fsck did not detect any inconsistencies. So I
had to reinstall linux again.

regards

vinny

>
> it probably seg faulted because your recursive
> program blew up its stack. it then dumped core,
> including all the memory you allocated.
>
> i'd guess that when you ran it on the other machine,
> you allocated all of memory and then other programs
> started to fail when they couldn't get space.
>
> try adding a check after the malloc call to see whether
> it failed.
>
> jan-simon.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/