Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use a smaller stack for stack-overflow test.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 17 Mar 2014 22:06:46 +0000 (23:06 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 17 Mar 2014 22:06:46 +0000 (23:06 +0100)
It is needed on FreeBSD to have a stack size < 125K to generate a SIGSEGV with
SEGV_ACCERR when using threads, and to have this test succeed.
Without that, the SIGSEGV is correctly generated, but with SEGV_MAPERR, and the
error message is not displayed.

I don't fully understand what's going on.

teshsuite/simix/stack_overflow.tesh

index 5bbebb5..2606c83 100644 (file)
@@ -1,5 +1,5 @@
 ! expect signal SIGSEGV
 ! expect signal SIGSEGV
-$ ./simix/stack_overflow ${srcdir:=.}/simix/stack_overflow.xml
+$ ./simix/stack_overflow --cfg=contexts/stack_size:96 ${srcdir:=.}/simix/stack_overflow.xml
 > [Tremblay:master:(0) 0.000000] [test/INFO] Launching our nice bugged recursive function...
 > Access violation detected. This can result from a stack overflow.
 > [Tremblay:master:(0) 0.000000] [test/INFO] Launching our nice bugged recursive function...
 > Access violation detected. This can result from a stack overflow.
-> Try to increase stack size with --cfg=contexts/stack_size (current size is 8192 KiB).
+> Try to increase stack size with --cfg=contexts/stack_size (current size is 96 KiB).