lkml.org 
[lkml]   [1999]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectLinux-crash by infinite recursion
Date
A simple infinite recursion kills Linux :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void InfRecursion (){
char c[4000];
InfRecursion ();
}

int main (){
InfRecursion ();
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I'm using Kernel 2.2.5, SuSE 6.1.
ulimit -s says : unlimited . That's the default in SuSE 6.1 !!!
I started the program from the Terminal-Emulation ktv under KDE.
After a while (of swapping), Linux was dead.

Well, one can avoid this by delimiting the stack via ulimit -s .
But it means, that Linux doesn't handle memory shortage gracefully.

In a similar case (QT-example dragdrop) the X-Server crashed and it wasn't
possible anymore to shutdown Linux.

Best wishes,
Stefan Knabe


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.042 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site