Re: amd64Translate.Operand.toAMD64Operand: strange Offset: ...

Matthew Fluet <[email protected]> Mon, 28 Sep 2015 13:06:47 -0400
Newsgroups gmane.comp.lang.ml.mlton.user
Message-ID <CAMrhFL6NZsOG9+DzynEq50wFOiHdvJTfKxgr0xL_ZV4PgiknsQ@mail.gmail.com>
On Mon, Sep 28, 2015 at 12:29 PM, Phil Clayton <[email protected]> wrote:
> 27/09/15 17:26, Phil Clayton wrote:
>> In future I'll work with both master and the last
>> release.  (I've just noticed that the helloworld GTK+ app built with
>> master causes a seg fault when exiting, so I'll investigate.)
>
> It was callbacks that were seg faulting.  Looking through the commit
> history and re-reading the documentation, it seems that the attribute
> 'reentrant' is now required.  Adding this to the function that transfers
> control to the GTK+ main loop fixes the issue.
>
> 'reentrant' is not recognized by 20130715.  Is there a way to have the
> same source code work with both 20130715 and master?

Yes, we've updated the foreign function interface to make the common
case a tiny bit faster --- calling a C function that has no
interaction with the ML runtime system.  But, a consequence is that we
need a little more work for the uncommon case, like callback functions
that have an implicit interaction with the ML runtime system.

Unfortunately, no, there isn't an easy way to handle both 20130715 and
master with these attributes.  If you are automatically generating
code, then you might be able to generate the two version and then use
MLB path variables to select between them.

-Matthew

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

------------------------------------------------------------------------------