FFI callbacks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

re: FFI callbacks

David T. Lewis
On Tue, Sep 15, 2015 at 02:34:52AM +0200, Craig Latta wrote:
>
>      Also, is it feasible to make FFI calls to a 64-bit C library?
>

I got 64-bit FFI working about five years ago but we never got it merged
into the VM (sorry). See http://bugs.squeak.org/view.php?id=7237

Those patches would be pretty badly bit-rotted by now, so I'm not
sure of the current state of affairs. I would anticipate a few issues,
because getting it to work in the old FFI was not trivial. It's
definitely worth getting this working again, but it may take a bit
of work to make it happen. Maybe it's easier with Eliot's more recent
work, because I think the assembler glue goes away and that may
simplify matters.

Dave


Reply | Threaded
Open this post in threaded view
|

re: FFI callbacks

Eliot Miranda-2
In reply to this post by ccrraaiigg
I get a lock up and a crash with the all-in-one.  No problem with the latest VM.  No diagnosis as yet.

On Mon, Sep 14, 2015 at 5:34 PM, Craig Latta <[hidden email]> wrote:

Hi Eliot--

> > I loaded Alien-eem.25 into Squeak 5.0.15110 on Mac OS 10.11.15A279b
> > from the Monticello HTTP repository at [1]. I ran AlienSunit in the
> > Test Runner, and it crashed Squeak. Before I get into posting error
> > logs, can anyone confirm that AlienSunit runs successfully on their
> > machine, on any host platform, or that I shouldn't expect it to run
> > successfully? Are there other Monticello packages I should be
> > loading, and if so, in what order?
>
> I get 15 passes and one failure, that being testLongLong.  But that's
> in my VMMaker image, which has some extras in it.  AFAIA tough Alien
> should just work.  I'll look at the testLongLong failure soon cuz I'm
> starting on the x64 JIT and that requires the above to work to access
> the processor alien.

     Would you please try with the current Squeak 5 release?

     Also, is it feasible to make FFI calls to a 64-bit C library?


     thanks again!

-C

--
Craig Latta
netjam.org
<a href="tel:%2B31%20%20%206%202757%207177" value="+31627577177" target="_blank">+31 6 2757 7177 (SMS ok)
<a href="tel:%2B%201%20415%20%20287%203547" value="+14152873547" target="_blank">+ 1 415 287 3547 (no SMS)
 
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

re: FFI callbacks

Eliot Miranda-2
In reply to this post by ccrraaiigg
Hi Craig,

On Mon, Sep 14, 2015 at 5:34 PM, Craig Latta <[hidden email]> wrote:

Hi Eliot--

> > I loaded Alien-eem.25 into Squeak 5.0.15110 on Mac OS 10.11.15A279b
> > from the Monticello HTTP repository at [1]. I ran AlienSunit in the
> > Test Runner, and it crashed Squeak. Before I get into posting error
> > logs, can anyone confirm that AlienSunit runs successfully on their
> > machine, on any host platform, or that I shouldn't expect it to run
> > successfully? Are there other Monticello packages I should be
> > loading, and if so, in what order?
>
> I get 15 passes and one failure, that being testLongLong.  But that's
> in my VMMaker image, which has some extras in it.  AFAIA tough Alien
> should just work.  I'll look at the testLongLong failure soon cuz I'm
> starting on the x64 JIT and that requires the above to work to access
> the processor alien.

     Would you please try with the current Squeak 5 release?

OK, so in an updated Squeak 5 release containing only Alien

- the 5.0 All-in-one locks up and core dumps
- the same VM from my site (CogSpur.app-15.27.3397.tgz) fails the testLongLong test but all others pass.

So there's something strange about the all-in-one.  I'll try and investigate further as time allows but perhaps you could look at the plugins and see whether one of them is rogue, e.g. by removing the external plugins one by one?
 

     Also, is it feasible to make FFI calls to a 64-bit C library?

Not from a 32-bit executable.  One can't even load a 64-bit library into a 32-bit executable.  Building a 64-bit version of the 32-bit VM is possible but a lot of work (needs a 674-nit JIT).  Instead I'm pursuing a proper all-64-bit solution.
 


     thanks again!

-C

--
Craig Latta
netjam.org
<a href="tel:%2B31%20%20%206%202757%207177" value="+31627577177">+31 6 2757 7177 (SMS ok)
<a href="tel:%2B%201%20415%20%20287%203547" value="+14152873547">+ 1 415 287 3547 (no SMS)





--
_,,,^..^,,,_
best, Eliot


12