| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Fix x86 SysV closure in PIC mode
|
| |
| |
| |
| |
| |
| |
| | |
The assembly single-line comments swallowed up the remaining assembly
code of the macros due to lack of line-endings.
This is a regression introduced in b7f6d7a.
|
|\ \
| |/
|/| |
Fix passing struct by value on aarch64
|
|/
|
|
| |
This fixes the ctypes test in the python testsuite.
|
| |
|
| |
|
|\
| |
| | |
Linker error "recompile with -fPIC" for x86_64
|
| |
| |
| |
| | |
use PLT. Without this fix, statically linking libffi causes the linker error i.e. 'requires dynamic R_X86_64_PC32 reloc against ffi_closure_unix64_inner which may overflow at runtime; recompile with -fPIC)'
|
|\ \
| | |
| | | |
mips/ffi.c: fix encoding for jr on r6
|
|/ /
| |
| | |
mips/ffi.c: instruction jr has a different encoding for r6
|
|\ \
| | |
| | | |
Enable symbol versioning when ld is LLVM's lld
|
| |/
| |
| |
| | |
Fixes #397
|
|\ \
| |/
|/| |
mips/n32.S: disable .set mips4 on mips r6
|
|/
|
|
|
| |
MIPS release changed encodes of some instructions, include ll/sc etc.
if .set mips4 on mips r6, as will generate some wrong encode of some instructions.
|
|\
| |
| | |
Makefile.am: add 'src/s390/internal.h' to source tarball
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 2f530de168e0253ac06e044c832132c496e8788b
("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>
|
|\
| |
| | |
Support NetBSD with mprotect.
|
| |
| |
| |
| | |
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|\ \
| | |
| | | |
aarch64: fix index base register for AArch64
|
| | |
| | |
| | |
| | |
| | | |
The base is passed in `x3`, not in `x2`. This fixes the indexing base
so that the right value is used.
|
|\ \ \
| |/ /
|/| | |
Fix linux detection (closes #303)
|
|/ / |
|
|\ \
| | |
| | | |
Simplify iOS trampoline table allocation
|
| | |
| | |
| | |
| | |
| | |
| | | |
By using VM_FLAGS_OVERWRITE there is no need for speculatively
allocating on a page we just deallocated. This approach eliminates the
race-condition and gets rid of the retry logic.
|
|\ \ \
| | | |
| | | | |
x86: align alloca to 16-byte boundary
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Align the stack allocation to a 16-byte boundary. This ensures that the
stack parameters are 16-byte aligned which is needed for some
instructions.
|
|\ \ \ \
| | | | |
| | | | | |
Xcode build improvements
|
| |\ \ \ \
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Added a tvOS target in Xcode project. Misc Xcode project cleanup.
Fix macOS build target in Xcode project.
# Conflicts:
# src/aarch64/ffi.c
# src/x86/ffi64.c
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Add missing files for desktop platforms in generate-darwin-source-and-headers.py, and in the Xcode project.
- Add a static library target for macOS.
- Fix "implicit conversion loses integer precision" warnings for iOS mad macOS targets.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Hjl/master
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since x32 doesn't support WIN64/EFI64, skip it if __ILP32__ is defined.
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
Since x32 doesn't support WIN64/EFI64, don't include it for x32. Also
x32 has sizeof size_t == 4. But TARGET should be X86_64.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
arm: fix a level of indirection issue
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Rather than relying on the stack being 0'ed out always, do it manually.
The stack generally happened to be zero, and because the compiler
realizes that the tests are dealing with chars truncates the read value.
However, the top 3 nibbles of the value are undefined and may be
non-zero. The indirection level caused a null-pointer dereference.
Explicitly scribbling on the stack during the allocation causes test
failures without the original zexting behaviour.
|
|\ \ \ \
| | | | |
| | | | | |
src/ia64/unix.S: unbreak small struct handling
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
commit 6e8a4460833594d5af1b4539178025da0077df19
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>
|
|\ \ \ \
| |_|_|/
|/| | | |
arm: zext return value parameters
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The closure function (invoked as closure->fun in ffi_closure_XXX_inner)
will only populate the actual number of bytes for the true return type,
which may be a character. This leaves garbage on the stack when the
assembly closure function (i.e. ffi_closure_XXX) reads the return value
off of the stack into r0 as a 4-byte value. ffi_closure_XXX always
leaves room for at least 4 bytes here, so we can safely set them to 0.
Otherwise, if there is garbage in any of these bytes, these end up in r0
and in the returned value as well.
|
|\ \ \
| | | |
| | | | |
Adds `local.exp` to DISTCLEANFILES
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With #315, #316, #317, #318 and this patch, running
```
AM_DISTCHECK_CONFIGURE_FLAGS=--disable-docs make distcheck
```
should complete successfully.
|
|\ \ \ \
| | | | |
| | | | | |
Add `configure.host` and `libtool-version` to the `EXTRA_DIST` files
|
| |\ \ \ \ |
|
| | |/ / / |
|
| |/ / /
| | | |
| | | | |
When running `make dist`, `configure.host` would not result in the distribution tarball, however `configure` would try to read it, and as such the tarball would not be buildable.
|
|\ \ \ \
| |/ / /
|/| | | |
Add src/x86/asmnames.h to noinst_HEADERS
|
|/ / /
| | |
| | | |
In eaa59755fcbb692a8cb763c7f9f24a350aadbd30, macros from `unix64.S` were extracted into `asmnames.h` to be used with `win64.S` as well. As such these are required by `unix64.S`, which fails to build without them.
|
| | | |
|