This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi,
This patch properly checks bad ABI. Otherwise, libffi.call/err_bad_abi.c always fails on Linux/x86-64.
I've committed this, with a minor adjustment... abi <= FFI_LAST_ABI should be abi < FFI_LAST_ABI
H.J. -- 2012-03-03 H.J. Lu<hongjiu.lu@intel.com>
* src/prep_cif.c (ffi_prep_cif_core): Properly check bad ABI.
diff --git a/src/prep_cif.c b/src/prep_cif.c index f50a63c..33993ad 100644 --- a/src/prep_cif.c +++ b/src/prep_cif.c @@ -112,7 +112,7 @@ ffi_status FFI_HIDDEN ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi, FFI_ASSERT(nfixedargs<= ntotalargs);
#ifndef X86_WIN32 - if (! (abi> FFI_FIRST_ABI)&& (abi<= FFI_LAST_ABI)) + if (! (abi> FFI_FIRST_ABI&& abi<= FFI_LAST_ABI)) return FFI_BAD_ABI; #else if (! (abi> FFI_FIRST_ABI&& abi< FFI_LAST_ABI || abi == FFI_THISCALL))
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |