[gambit-list] Problem with FFI & Memory Corruption

Álvaro Castro-Castilla alvaro.castro.castilla at gmail.com
Mon Feb 13 15:00:39 EST 2012


hum... I still get the same
*** WARNING -- Could not find C function: "____20_xml_2e_o1"
*** ERROR IN (console)@1.1 -- /home/alvatar/gambit-xml/xml.o1: undefined
symbol: ___release_scmobj

I've surrounded all those calls with ___EXT()



2012/2/13 Marc Feeley <feeley at iro.umontreal.ca>

> Can you try the change I suggest to see if the problem goes away?
>
> Marc
>
> On 2012-02-13, at 5:59 AM, Álvaro Castro-Castilla wrote:
>
> > Marc, if you mean my error, it was on Linux 3.1 (Gentoo), and happens
> also on latest Ubuntu on VirtualBox.
> >
> >
> >
> > 2012/2/13 Marc Feeley <feeley at iro.umontreal.ca>
> >
> > On 2012-02-12, at 8:43 AM, Álvaro Castro-Castilla wrote:
> >
> > > Hi Taylor,
> > >
> > > Do you plan on making full bindings for libxml2? I'd be interested in
> packaging it as a Blackhole module when you are ready.
> > > Also, when following your steps I got this error:
> > > > (load "xml")
> > > *** WARNING -- Could not find C function: "____20_xml_2e_o1"
> > > *** ERROR IN (console)@1.1 -- /home/alvatar/gambit-xml/xml.o1:
> undefined symbol: ___release_scmobj
> > >
> > > Using gambit 4.6.3
> > >
> > > Best regards,
> > >
> > > Álvaro
> >
> > I'm not sure this is the cause of the bug, but I have noticed that
> Taylor's code is not completely portable.  It contains references to Gambit
> runtime functions that are not wrapped in a call to ___EXT. In other words,
> the calls
> >
> > vect = ___make_vector(4, ___FAL, ___STILL);
> > ___release_scmobj(x);
> > tmp = ___make_pair(x, lst, ___STILL);
> >
> > should be written
> >
> > vect = ___EXT(___make_vector)(4, ___FAL, ___STILL);
> > ___EXT(___release_scmobj)(x);
> > tmp = ___EXT(___make_pair)(x, lst, ___STILL);
> >
> > This is needed on some operating systems to link with the Gambit runtime
> system functions.  On the operating systems that don't need anything
> special, the call ___EXT(f) is replaced with f, so there is no overhead.
> >
> > By the way, on which OS did this problem occur?
> >
> > Marc
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20120213/8d28155e/attachment.htm>


More information about the Gambit-list mailing list