"Marc" == Marc Feeley feeley@iro.umontreal.ca writes:
Marc> Hard to say without access to your code... What other Marc> c-lambdas and c- defines do you have?
I forgot to mention, this segfault happens when I'm running the simulation that you can check out here:
# svn co http://chondestes.bio.unc.edu/svn/models/agjones agjones
Here's what happens:
============================================================ (gdb) run Starting program: /usr/local/Gambit-C/v4.2.8/bin/gsc Gambit v4.2.8
(load "genxic")
"/home/joel/lisp/scm/genxic/scm/genxic.o1"
(gsl-variance (f64vector 0.1 2.5))
2.88
(current-directory "/home/joel/lisp/scm/agjones") (load "main.scm")
*** WARNING -- Rebinding global variable "vector-length" to an interpreted procedure *** WARNING -- Rebinding global variable "f64vector-length" to an interpreted procedure "/home/joel/lisp/scm/agjones/main.scm"
(run-sim)
*** STOPPED IN run-sim, "data.scm"@133.6 1> ,e stream-initialize = #!unbound stream-consume = #!unbound 1> ,i #<procedure #2 run-sim> = (lambda () (letrec ((stream-initialize (lambda () (gen-sim-data (vector-length *model-param-vector*)))) (stream-consume (lambda (a b) (call-with-current-continuation (lambda (done) (set! *done* done) (if (null? a) (*done* "Done!") (summarize-sim-data a)) (call-with-values (lambda () (force b)) stream-consume)))))) (call-with-values stream-initialize stream-consume))) 1> ,c | > (vector-length '#((100 50 16 2 1000. .5 0. 0. 0. 1e-4 1. .25 true) (100 5... | 1152 | > (gen-sim-data 1152) .| #<unknown> | > (f64vector-length '#f64(1000.1137275451473 1000.1113046603153 1000.179049... | 41 | > (f64vector-length '#f64(1000. 1000. 1000. 1000. 1000. 1000. 1000. 1000. 1... | 59 ...snip... | > (f64vector-length '#f64(0. 0. 0. 0. 1000.2159945301612 1000.1360547757907... | 46 | > (f64vector-length '#f64(1000. 1000. 1000. 1000. 1000. 1000. 1000. 1000. 1... | 54 | > (gen-sim-data 1053) . Program received signal SIGSEGV, Segmentation fault. 0xb78815d4 in mark_continuation () at mem.c:2430 (gdb) backtrace #0 0xb78815d4 in mark_continuation () at mem.c:2430 #1 0xb7883ccf in ___garbage_collect (nonmovable_words_needed=0) at mem.c:3938 #2 0xb78a9b57 in ___H__20___kernel (___ps=0xb7c99820) at _kernel.c:7687 #3 0xb787cec5 in ___call (nargs=0, proc=-1212572783, stack_marker=134579429) at setup.c:1821 #4 0xb787e7ec in ___setup (setup_params=0xbfe353b4) at setup.c:2961 #5 0xb787a578 in ___main (linker=0x8050628 <____20___gsc__>) at main.c:582 #6 0xb788d6fd in ___main_char (argc=1, argv=0xbfe35554, linker=0x8050628 <____20___gsc__>, script_line=0x0) at os_base.c:338 #7 0x08050669 in main (argc=-1218998865, argv=0xb75efbd1) at _gsc_.c:12043 (gdb) break mem.c:2430 Breakpoint 2 at 0xb78815cf: file mem.c, line 2430. (gdb) run The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/local/Gambit-C/v4.2.8/bin/gsc
Breakpoint 2, mark_continuation () at mem.c:2430 (gdb) backtrace #0 mark_continuation () at mem.c:2430 #1 0xb7920ccf in ___garbage_collect (nonmovable_words_needed=0) at mem.c:3938 #2 0xb793c9dc in ___H__20___kernel (___ps=0xb7d36820) at _kernel.c:3246 #3 0xb7919e41 in ___call (nargs=0, proc=-1211929711, stack_marker=134579429) at setup.c:1817 #4 0xb791b7ec in ___setup (setup_params=0xbfcd2254) at setup.c:2961 #5 0xb7917578 in ___main (linker=0x8050628 <____20___gsc__>) at main.c:582 #6 0xb792a6fd in ___main_char (argc=1, argv=0xbfcd23f4, linker=0x8050628 <____20___gsc__>, script_line=0x0) at os_base.c:338 #7 0x08050669 in main (argc=3198, argv=0xf01d) at _gsc_.c:12043 (gdb)
============================================================ What does mark_continuation() do?
Joel