public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* ffi 3.3.rc0 problem
@ 2019-07-01 16:18 Péter Iványi
  0 siblings, 0 replies; only message in thread
From: Péter Iványi @ 2019-07-01 16:18 UTC (permalink / raw)
  To: libffi-discuss

Hi!

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
src/x86/ffi.c:294
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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-01 16:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 16:18 ffi 3.3.rc0 problem Péter Iványi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).