ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI when things are wrong.

* src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
	just return FFI_BAD_ABI when things are wrong.

From-SVN: r190230
This commit is contained in:
Uros Bizjak 2012-08-08 16:48:43 +02:00 committed by Uros Bizjak
parent 6b4a85ad6f
commit aa5d8db019
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-08-08 Uros Bizjak <ubizjak@gmail.com>
* src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
just return FFI_BAD_ABI when things are wrong.
2012-07-18 H.J. Lu <hongjiu.lu@intel.com>
PR libffi/53982

View file

@ -750,7 +750,8 @@ ffi_prep_closure_loc (ffi_closure *closure,
void *user_data,
void *codeloc)
{
FFI_ASSERT (cif->abi == FFI_SYSV);
if (cif->abi != FFI_SYSV)
return FFI_BAD_ABI;
#ifndef __s390x__
*(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */