Commit Graph
3 Commits
Author SHA1 Message Date
Sergei Trofimovich 45da2fcbcd new test: return small struct
The bug originally was discovered in https://bugs.gentoo.org/634190
where complicated callback was returning invalid data on ia64.

This change adds minimal reproducer that fails only on ia64 as:

FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O0 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O2 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O3 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -Os execution test

Test passes on amd64. The fix is in the following commit.

Bug: https://bugs.gentoo.org/634190
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2018-02-17 18:53:02 +00:00
Sergei Trofimovich cd5e9f8b87 Makefile.am: add 'src/s390/internal.h' to source tarball
commit 2f530de168
("s390: Reorganize assembly") introduced new header
(similar to other arches) but did not add it to source
tarball.

As a result build from 'make dist' tarballs failed as:

```
../src/s390/ffi.c:34:10: fatal error: internal.h: No such file or directory
 #include "internal.h"
          ^~~~~~~~~~~~
```

To fix it the change adds file to 'Makefile.am'.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-11-05 13:56:42 +00:00
Sergei Trofimovich ed7488c003 src/ia64/unix.S: unbreak small struct handling
commit 6e8a446083
added FFI_TYPE_COMPLEX value type (comes after FFI_TYPE_POINTER)

ia64 ffi_closure_unix reiles on the ordering of
FFI_ enums as ia64 has ia64-specific FFI types:
small struct and FPU extesions.

As a result all tests handling small structs broke.

The change fixes dispatch table by adding (no-op)
FFI_TYPE_COMPLEX entry
This has positive effect of unbreaking most tests
on ia64:

                 === libffi Summary ===

-# of expected passes            1595
-# of unexpected failures        295
+# of expected passes            1930
+# of unexpected failures        10
 # of unsupported tests          30

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-10-17 13:00:51 +01:00