[squeak-dev] x86 linux VM FFI FPU stack overflow
nicolas cellier
ncellier at ifrance.com
Sun Jan 11 11:22:09 UTC 2009
Apologies for the cryptic subject...
I have some news about http://bugs.squeak.org/view.php?id=3929
I detected with gdb that the example I provided triggers a FPU stack
overflow. When this occurs, a qNan is placed on FPU stack top.
Thus, though ffiFloatReturnValue == 0.0, testing in Smalltalk (self
myFFICall = 0.0) will result in 0.0==Nan due to stack overflow.
primitive which execute special send #= will incorrectly return false...
Don't tell me to not use = on Floats, this is not the problem, you can
replace the test with (self myFFICall < 1.0), you will get (0.0<qNan) ->
false all the same.
At this point, I see two possibilities:
- either I totally messed up with calling conventions
- or the FFI glue ffiCallAddressOf is broken
($VM/Squeak-3.10-1/platforms/unix/plugins/SqueakFFIPrims/x86-sysv-asm)
I have no knowledge about IA-32 and don't wish to learn further, using
gdb at instruction level was already painfull enough for me.
Can somebody aware of x86 and calling convention check my guess?
Nicolas
More information about the Squeak-dev
mailing list
|