[gambit-list] simple gsc'd program segfaults

Stephen Sinclair radarsat1 at gmail.com
Tue Aug 25 18:10:35 EDT 2009


Hello!

I'm interested in playing with Scheme a bit lately, so I thought I'd
check out Gambit.  Well, I had no problems getting the interpreter to
work, but I seem to be having issues with the compiler.  I installed
this from the Ubuntu intrepid repo btw.  Here is an example session,
showing that some very simple code just seems to segfault when
compiled.  Tried this on two different computers, what am I doing
wrong?  Thanks.


Steve


$ echo '(display (+ 1 2))' >test.scm

$ gsc -o test test.scm

$ ./test
Segmentation fault

$ gsc -link -o test.c test.scm

$ gcc -o test test.c -lgambc

$ ./test
Segmentation fault

$ gcc -O0 -g -o test test.c -lgambc

$ gdb ./test
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) r
Starting program: /home/sinclairs/scheme/space-invaders/test

Program received signal SIGSEGV, Segmentation fault.
0xb7ffc223 in ?? () from /usr/lib/libgambc.so.4
(gdb) bt
#0  0xb7ffc223 in ?? () from /usr/lib/libgambc.so.4
Cannot access memory at address 0x5
(gdb)



More information about the Gambit-list mailing list