◐ Shell
clean mode source ↗

Message 239117 - Python tracker

I was looking into http://lists.cs.uiuc.edu/pipermail/llvmbugs/2012-September/025152.html 'Use of libclang python bindings on Windows 7 64 bit fails with memory access violation'

It appears to be 90% fixed with this patch, but I believe there is still a problem when structs are passed back though a callback function.

Could this be the correct addition to fix it?
in ffi_prep_incoming_args_SYSV() _ctypes\libffi_msvc\ffi.c(line 377)

      /* because we're little endian, this is what it turns into.   */

+#if _WIN64
+      if ((*p_arg)->type == FFI_TYPE_STRUCT && z > 8)
+          {
+          z = 8;
+          *p_argv = *(void**)argp;
+          }
+      else
+          {
+          *p_argv = (void*)argp;
+          }
+#else
      *p_argv = (void*)argp;
+#endif