[PATCH]: Small patch for libffi.call/err_bad_abi.c libffi failures on s390
Uros Bizjak
ubizjak@gmail.com
Wed Aug 1 20:44:00 GMT 2012
Hello!
I have noticed that s390 fails a couple of libffi failures [1]:
FAIL: libffi.call/err_bad_abi.c -O0 -W -Wall execution test
FAIL: libffi.call/err_bad_abi.c -O2 execution test
FAIL: libffi.call/err_bad_abi.c -O3 execution test
FAIL: libffi.call/err_bad_abi.c -Os execution test
FAIL: libffi.call/err_bad_abi.c -O2 -fomit-frame-pointer execution test
These failures should be fixed by following patch, in the same way as
other targets:
2012-08-01 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.
Untested (for obvious reasons), but should be trivially correct.
[1] http://gcc.gnu.org/ml/gcc-testresults/2012-08/msg00082.html
Uros.
-------------- next part --------------
Index: ChangeLog
===================================================================
--- ChangeLog (revision 190015)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2012-08-01 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
Index: src/s390/ffi.c
===================================================================
--- src/s390/ffi.c (revision 190015)
+++ src/s390/ffi.c (working copy)
@@ -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 */
More information about the Libffi-discuss
mailing list