Stack size for BEAST checks




Hi!  Is allocating huge amounts of stack part of what testwavechunk in
bse/test is supposed to test?  If not, here's a patch to allocate the
tmpstorage for the tests on the heap rather than on the stack.

With this patch, "make check" completes successfully on FreeBSD 5.2.1
(without having to raise the default (at least default with my rather
small size of RAM) limit for stack size), even if there is some
messages that seems rather problematic.  I attach the "worst" part of
my log, is it something that should be further investigated?


-- 
Rasmus Kaj ----------------------------------------------- rasmus@kaj.se
 \                     The more things change, the more they stay insane
  \------------------------------------- http://www.stacken.kth.se/~kaj/
--- bse/tests/testwavechunk.c~	Sun Jun  8 18:23:09 2003
+++ bse/tests/testwavechunk.c	Fri Mar 12 21:41:46 2004
@@ -57,7 +57,8 @@
 	   gint		   loop_last,
 	   gint		   loop_count)
 {
-  gfloat tmpstorage[DEBUG_SIZE], *cmpblock = tmpstorage + DEBUG_SIZE / 2;
+  gfloat *tmpstorage = (gfloat*)calloc(DEBUG_SIZE, sizeof(gfloat)),
+    *cmpblock = tmpstorage + DEBUG_SIZE / 2;
   GslDataHandle *myhandle;
   GslDataCache *dcache;
   GslWaveChunkBlock block = { 0, };
@@ -129,6 +130,8 @@
     }
   gsl_wave_chunk_close (wchunk);
   gsl_data_cache_unref (dcache);
+
+  free(tmpstorage);
 }
 
 static void
gmake[4]: Entering directory `/usr/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests'
[...]

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): GLib-GObject-CRITICAL **: file gclosure.c: line 311 (g_closure_ref): assertion `closure != NULL' failed

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): GLib-GObject-CRITICAL **: file gclosure.c: line 356 (g_closure_sink): assertion `closure != NULL' failed

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): BSE-WARNING **: bsecxxbase.cc:106: ignoring invalid signal connection ("|P" != "|Piriiiii")

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): GLib-GObject-CRITICAL **: file gclosure.c: line 337 (g_closure_unref): assertion `closure != NULL' failed

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): GLib-GObject-CRITICAL **: file gclosure.c: line 311 (g_closure_ref): assertion `closure != NULL' failed

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): GLib-GObject-CRITICAL **: file gclosure.c: line 356 (g_closure_sink): assertion `closure != NULL' failed

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): BSE-WARNING **: bsecxxbase.cc:106: ignoring invalid signal connection ("|P" != "r|is")

(/home/kaj/miscsrc/beast/beast-0.6.1/bse/tests/.libs/lt-testcxx:39954): GLib-GObject-CRITICAL **: file gclosure.c: line 337 (g_closure_unref): assertion `closure != NULL' failed
PASS: testcxx


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]