ffi 3.3.rc0 problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ffi 3.3.rc0 problem

Péter Iványi

I have downloaded the latest version (3.3.rc0) of FFI from Github.
The code under the x86 architecture has changed sine 3.2.1 and it is not working
with Visual Studio for 32 bit Windows programs.

I have traced back the problem to
where the system uses the "alloca" function.
I think the problem is that Visual Studio is applying stack canaries when it is
using alloca. It places CCCCCCCCh values under the allocated stack
space. When the function is exiting, it is checking for the existence
of these stack
canaries. However in the sysv_intel.S code there is a "messing around"
with the stack
and the stack canaries are overwritten.

May I ask why the x86 code has been changed?
What was the reason?

Version 3.2.1 was and is working!
I have a cmake building system for ffi. I can send it if you want to check it.

Best regards,

Peter Ivanyi