[Vm-dev] Re: [squeak-dev] help needed with the new FFI plugin...

David T. Lewis lewis at mail.msen.com
Sun Jul 24 17:01:42 UTC 2011


On Sat, Jul 23, 2011 at 01:50:49PM +0200, Levente Uzonyi wrote:
>
> Threaded FFI is great, it opens new possibilities, but nowadays the
> feature I miss the most is the ability to call functions in 64-bit
> (x86_64) libraries (from a 32-bit VM/image).

As far as I know, mixing 32-bit and 64-bit libraries in a single
executable (VM) is not feasible, at least not on Linux. Maybe it
would work in the case of statically linked libraries, I'm not
certain.

The traditional FFI does not work for 64-bit VMs, and I expect
that this needs to be resolved for any new FFI implementation as
well, because some of the issues were in the interpreter itself,
not just the FFI plugin. The issue also may affect other things,
e.g. Igor's proposed #primLoadModule primitive crashes the VM
if compiled for 64 bit.

I had intended to push the fixes for 64-bit FFI as a VM team
initiative, but it's a complex set of changes that require
coordination of VMMaker (oscog plus traditional), as well as
of all the platforms (oscog, trunk, all platforms) so IMO this
would be a lot to take on right now.

But I guess that I should ask - is there interest in implementing
fixes for 64-bit FFI?

Some background:

Mantis report and patches to implement the fixes, circa 2008. I
assume some bit rot will have set in by this time:
 <http://bugs.squeak.org/view.php?id=7237>

Status of the fixes, as tested on various platforms:
 <http://lists.squeakfoundation.org/pipermail/vm-dev/2008-May/001945.html>

The last discussion relative to VM team priorities:
 <http://lists.squeakfoundation.org/pipermail/vm-dev/2009-July/002853.html>

Dave



More information about the Vm-dev mailing list