[gambit-list] executable works, loadable module segfaults

REPLeffect repleffect at gmail.com
Fri Sep 28 05:22:39 EDT 2012


I came across a strange behavior with Gambit Scheme on Windows (XP, in
this case).  I wrote a module to convert C++ std::string types to
Gambit char-strings.  I wanted to use that in a loadable module.  This
all works fine on Linux, but I also need to use it on Windows.  I'm
using MinGW's C++ compiler (g++ version 4.6.2 -- which I also used to
compile Gambit).  And I'm still on version 4.6.5 of Gambit Scheme.

I've attached a zipped tar file with an example (6 files, including a
build.windows script and a build.linux script).

When I load the shared module in gsi on Windows XP, it segfaults in
___garbage_collect(long) -- I believe it was in the call to
___alloc_scmobj.  When I load it on Linux it works just fine.  The
executable built by the scripts on both platforms works just fine.

I would love to know what is causing this.  I've spent many hours
trying to find the source of the problem, and finally narrowed it down
to this.

Any help/explanations/suggestions would be much appreciated.

repleffect
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tgz
Type: application/x-gzip
Size: 1619 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20120928/8f946b05/attachment.bin>


More information about the Gambit-list mailing list