[Vm-dev] SqueakFFI ARMv8 (Apple M1) | Struct Arg CRASH
marcel.taeumel at hpi.de
Wed Apr 13 13:31:26 UTC 2022
Hi Eliot, hi all --
There is an issue with pushing certain struct args with doubles before the callout. Works fine through Rosetta (macos64x64), crashes otherwise (macos64ARMv8).
The following tests produce the crash. A breakpoint in sqFFITestFuncs.c shows that the function args are not correct:
FFIPluginTests >> #testSumStructSslf
FFIPluginTests >> #testSumStructSslf2
FFIPluginTests >> #testSumStructSslf4
FFIPluginTests >> #testSumStructSSdi5
FFIPluginTests >> #testSumdiStructWithStructSdi4
FFIPluginTests >> #testSumiStructWithStructSdi4
My hypothesis is that there is an issue with pushing integer-float combinations such as:
int16_t int64_t float ... slf
double int32_t ... di
Yet, the funny thing is that the following tests do not crash even though they also use "di" structs:
FFIPluginTests >> #testSumStructSdi
FFIPluginTests >> #testSumStructSdi2
FFIPluginTests >> #testSumStructSdi4
Since nothing serious happens in sqFFITestFuncs.c and everything is fine on X86(_64) builds, I suspect that argument pushing has a bug. Maybe even on all ARMv8 builds.
Could somebody check on Linux? Bruce?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev