summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2014-09-18 19:05:35 -0400
committerAnthony Green <green@moxielogic.com>2014-09-18 19:05:35 -0400
commit5df384077f3633ec8cf2e08f9199e5a44994dbad (patch)
tree38d6fea8b98df6b051309f2befe93c28e052ed16
parent7b7a5284de7a99edfcee5ac362dbf76251698e1e (diff)
parent0f4e09d27dc175ce3e95d070b794351663c7220e (diff)
downloadlibffi-5df384077f3633ec8cf2e08f9199e5a44994dbad.tar.gz
Merge pull request #129 from frida/fix/darwin-aarch64-cif-prep
Fix non-variadic CIF initialization for Apple/ARM64
-rw-r--r--src/aarch64/ffi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
index b807a2d..05f1a13 100644
--- a/src/aarch64/ffi.c
+++ b/src/aarch64/ffi.c
@@ -779,6 +779,8 @@ ffi_prep_cif_machdep (ffi_cif *cif)
}
}
+ cif->aarch64_nfixedargs = 0;
+
return FFI_OK;
}
@@ -789,9 +791,13 @@ ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif,
unsigned int nfixedargs,
unsigned int ntotalargs)
{
+ ffi_status status;
+
+ status = ffi_prep_cif_machdep (cif);
+
cif->aarch64_nfixedargs = nfixedargs;
- return ffi_prep_cif_machdep(cif);
+ return status;
}
#endif