So win32 FFI test crash the VM if compiled with gcc.
But tests pass if compiled with clang (i686-w64-mingw32-clang on cygwin64)
---------------- details following -----------------
The problem with gcc is the famous ALLOCA_LIES_SO_USE_GETSP
Indeed, alloca reserve 16 more bytes than necessary. That is, it answers a value, but increment
stack pointer = return alloca'd + 16
It's wrong because we want to pile up FFI args starting at stack pointer, just above the future return address.
So there is a hack in code generation that used to workaround the problem: use SP instead of alloca'd value for marshalling FFI args.
Unfortunately as we could have guessed it was fragile...
Recent versions of gcc do use the 16 extra bytes !!!
Indeed it seems that the function calls that are used for marshalling FFI arguments will use SP,SP+4,SP+8 and SP+12 for their own arguments, without incrementing SP first
Thus when we try and fill the FFI argument stack, we break the own stack of these functions... Since most of these arguments are pointers (oops and calloutState), then we very soon SEGV.