Commit f27c4e46734fa1342236b16161e6006a9d2557e9

Richard Henderson 2015-01-13T07:22:07

x86: Fix thinko in ffi_raw_call Missed structure initialization for raw path. Apparently there are no tests for this outside gcc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/x86/ffi.c b/src/x86/ffi.c
index 3885e39..feb5cbb 100644
--- a/src/x86/ffi.c
+++ b/src/x86/ffi.c
@@ -675,6 +675,10 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *avalue)
   if (rsize)
     rvalue = frame + 1;
 
+  frame->fn = fn;
+  frame->flags = flags;
+  frame->rvalue = rvalue;
+
   narg_reg = 0;
   switch (flags)
     {