[pypy-commit] cffi windows: another place where function call needs at least 40 bytes stack size

matti noreply at buildbot.pypy.org
Thu Jul 25 23:53:46 CEST 2013


Author: matti
Branch: windows
Changeset: r1295:55d1624ba4be
Date: 2013-07-26 00:46 +0300
http://bitbucket.org/cffi/cffi/changeset/55d1624ba4be/

Log:	another place where function call needs at least 40 bytes stack size

diff --git a/c/libffi_msvc/prep_cif.c b/c/libffi_msvc/prep_cif.c
--- a/c/libffi_msvc/prep_cif.c
+++ b/c/libffi_msvc/prep_cif.c
@@ -161,13 +161,16 @@
 	  /* Add any padding if necessary */
 	  if (((*ptr)->alignment - 1) & bytes)
 	    bytes = ALIGN(bytes, (*ptr)->alignment);
-	  
+           
 #endif
 	  bytes += STACK_ARG_SIZE((*ptr)->size);
 	}
 #endif
     }
 
+#if defined(_MSC_VER) && defined(_WIN64)
+  bytes = bytes < 40 ? 40 : bytes;
+#endif  
   cif->bytes = bytes;
 
   /* Perform machine dependent cif processing */


More information about the pypy-commit mailing list