[Openmcl-devel] Troubleshooting FFI calls on ARM

Stas Boukarev stassats at gmail.com
Sat Jun 22 04:45:58 PDT 2019


On Fri, Jun 21, 2019 at 7:09 PM Jeremy Shoemaker <jeremy at codingkoi.com> wrote:
>
> Okay, I thought I had tried this already, but it definitely works with "printf" using both methods. I was using "getpid" because it's the first example in the documentation. I had already tried the underlying EXTERNAL-CALL approach with "getpid", it segfaults both ways.
>
> I went back and tried the other examples there. "getpid" and "log2" both segfault, but the example with "write" works. I was thinking maybe there might be some connection between which library they're part of, but the first and last are both posix functions and "log2" is from libc.
>
> Any ideas on how I can go about figuring out why some of them work and the others don't?
Is the stack correctly aligned? SIMD operations, which may be used by
log2, may depend on the stack being correctly aligned, probably
double-world-aligned.
If you dump a core you can find in gdb which instruction is faulting.



More information about the Openmcl-devel mailing list