Hi!
I don't know, if this is SMP related, but someone told me
everything works fine on his *single CPU* machine (2.3.10 kernel).
Could anybody check this (it would be best *not* to try it on a
production machine...)
cat crash.c
#include <alloca.h>
#include <string.h>
#include <stdlib.h>
int main(int argc,char *argv[])
{
if(argc==2)
{
unsigned int n = 1 << atoi(argv[1]);
char *b = alloca(n);
if(b)
memset(b,0,n);
}
return 0;
}
gcc -o crash crash.c
./crash 30
This will reproducably crash my machine.
It is a dual Pentium III running a vanilla linux 2.2.16.
free
total used free shared buffers cached
Mem: 517260 43220 474040 10516 10484 15976
-/+ buffers/cache: 16760 500500
Swap: 265032 22064 242968
The mashine simply stops working.
You don't have to be root for that!
Everything works smoothly up to the time, when all swap space has been
consumed.
After that, you can't do anything but pressing the reset button.
I assume, that's a bug.
Bye and thanks in advance for any hint, (--> is there a patch?)
Martin.
PS: Our HP box simply sais, that the stackspace is too small.
If i remember correctly, i never saw this behaviour with
kernels < 2.2.16.
PPS: Then man page of alloca tells me, that alloca should return 0
on error. Try to find that comparison in the assembler
output of the above mentioned testcase.
PPPS: If you think that there are few progs which cause this
behaviour, try bootstrapping egcs-20000724!
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]