[gambit-list] segfault when ,q from embedded web-repl

Emit Sorrels emit.sorrels at gmail.com
Tue May 25 14:14:57 EDT 2010


Hello,

I'm experimenting with Gambit as an embedded scripting engine
(to replace a Lua-based one) inside a large application written in C.
For the most part, the scm<->c interop is working well for my use-case.

I would now like to add a remote REPL for debugging and changing
application logic on the fly. I added examples//web-repl.scm
into my app and exposed start-repl-server within a c-define.

Surprisingly it works, but I notice that if I do ,q or ,qt the application
segfaults.
gdb bt is no help
#0  0x00007ffff742c2b8 in siglongjmp () from /lib/libc.so.6
#1  0x00000000004c0f3c in ___call ()
#2  0x00000000004bff3e in start_repltest ()
#3  0x00000000004c0060 in main ()

Also, the application no longer responds to ctrl-c.
Furthermore, as soon as I hit ctrl-c, the app starts eating up massive
amount of cpu and ram.
ram usage rapidly increase and segfaults when it runs out
(goes from few megabytes to 8GB in less than a minute).

I've attached a small 30 line c file + web-repl based scm combo that
reproduces this
on my machine

Linux 2.6.33-ARCH #1 SMP PREEMPT Mon Apr 26 19:31:00 CEST 2010
x86_64 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz GenuineIntel GNU/Linux

Gambit v4.6.0

Any suggestions would be much appreciated.

-Emit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100525/93db57aa/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 510 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100525/93db57aa/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repltest.scm
Type: application/octet-stream
Size: 3873 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100525/93db57aa/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repltest.h
Type: text/x-chdr
Size: 31 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100525/93db57aa/attachment.h>


More information about the Gambit-list mailing list