|
785351fb
|
2018-03-13T09:21:49
|
|
Preformat release notes
|
|
8c7fbd16
|
2018-03-13T09:20:44
|
|
Preformat release notes
|
|
54f31b00
|
2018-03-13T09:17:57
|
|
Try to fix table
|
|
3a29a27a
|
2018-03-13T09:14:40
|
|
Clean up markdown table
|
|
fbfc3b04
|
2018-03-13T09:12:21
|
|
Move to markdown
|
|
a31d3d3b
|
2018-03-13T09:11:24
|
|
Add travis and appveyor build badges
|
|
16313cb2
|
2018-03-13T08:52:30
|
|
Support compiler specific warning suppression flags
|
|
cca6d1fb
|
2018-03-13T08:51:34
|
|
Support compiler specific warning suppression flags
|
|
9291f941
|
2018-03-13T08:37:21
|
|
Add bhaible's missing Makefile
|
|
bede01d8
|
2018-03-13T07:53:33
|
|
Remove stray directory
|
|
9aefbb10
|
2018-03-13T07:51:02
|
|
Update version number to next pre-release
|
|
ddf7a8f7
|
2018-03-13T07:47:57
|
|
Update test list for dist
|
|
6186261c
|
2018-03-12T21:53:18
|
|
Add Bruno Haible and Bill Triggs' libffi testsuite
|
|
4e8f79d5
|
2018-03-11T18:21:46
|
|
Next release will be 3.3
|
|
3840d49a
|
2018-03-11T05:55:15
|
|
New RISC-V port (#281)
* Add RISC-V support
This patch adds support for the RISC-V architecture (https://riscv.org).
This patch has been tested using QEMU user-mode emulation and GCC 7.2.0
in the following configurations:
* -march=rv32imac -mabi=ilp32
* -march=rv32g -mabi=ilp32d
* -march=rv64imac -mabi=lp64
* -march=rv64g -mabi=lp64d
The ABI currently can be found at
https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md .
* Add RISC-V to README
* RISC-V: fix configure.host
|
|
dca52b55
|
2018-03-11T08:50:01
|
|
Merge pull request #406 from trofi/master
ia64: fix variadic function closures with FP arguments
|
|
83d9aba3
|
2018-03-11T08:48:42
|
|
Merge pull request #407 from trofi/ia64-small-struct
ia64: fix small struct return
|
|
ab154056
|
2018-03-11T08:46:58
|
|
Merge pull request #409 from andreas-schwab/master
Revert "Fix passing struct by value on aarch64"
|
|
e66fd678
|
2018-02-20T10:47:09
|
|
Revert "Fix passing struct by value on aarch64"
This reverts commit 482b37f00467325e3389bab322525099860dd9aa.
That was actually a bug in python, see <https://bugs.python.org/issue30353>.
|
|
b58caef7
|
2018-02-17T19:00:40
|
|
ia64: fix small struct return
This change fixes libffi.call/struct10.c failure on ia64:
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O0 execution test
.Lst_small_struct handles returns for structs less than 32 bytes
(following ia64 return value ABI [1]). Subroutine does roughly the
following:
```
mov [sp+0] = r8
mov [sp+8] = r9
mov [sp+16] = r10
mov [sp+24] = r11
memcpy(destination, source=sp, 12);
```
The problem: ia64 ABI guarantees that top 16 bytes of stack are
scratch space for callee function. Thus it can clobber it. [1]
says (7.1 Procedure Frames):
"""
* Scratch area. This 16-byte region is provided as scratch storage
for procedures that are called by the current procedure. Leaf
procedures do not need to allocate this region. A procedure may
use the 16 bytes at the top of its own frame as scratch memory,
but the contents of this area are not preserved by a procedure call.
"""
In our case 16 top bytes are clobbered by a PLT resolver when memcpy()
is called for the first time. As a result memcpy implementation reads
already clobbered data frop top of stack.
The fix is simple: allocate 16 bytes of scrats space prior to memcpy()
call.
[1]: https://www.intel.com/content/dam/www/public/us/en/documents/guides/itanium-software-runtime-architecture-guide.pdf
Bug: https://bugs.gentoo.org/634190
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
45da2fcb
|
2018-02-17T18:53:02
|
|
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>
|
|
11de69dd
|
2018-02-11T11:29:39
|
|
ia64: fix variadic function closures with FP arguments
libffi test framework already flagged failures as:
```
FAIL: libffi.call/cls_double_va.c -W -Wall -Wno-psabi -O0 output pattern test, is 7.0
res: 4
0.0
res: 4
? should match 7.0
?es: 4
?.0
res: 4
```
Failure happens here at
```c
// testsuite/libffi.call/cls_double_va.c
...
char* format = "%.1f\n";
double doubleArg = 7;
...
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_double_va_fn, NULL,
code) == FFI_OK);
res = ((int(*)(char*, ...))(code))(format, doubleArg);
```
libffi expects 'doubleArg' to be located in 'f9' (second FP argument) but
gcc placed it to 'r33' (second GR).
ia64 software [1] manual described argument passing ABI in
"8.5.2 Register Parameters" as:
"""
If an actual parameter is known to correspond to a floating-point
formal parameter, the following rules apply:
a) The actual parameter is passed in the next available floating-point
parameter register, if one is available. Floating-point parameter
registers are allocated as needed from the range f8-f15, starting
with f8.
b) If all available floating-point parameter registers have been used,
the actual parameter is passed in the appropriate general register(s).
(This case can occur only as a result of homogeneous floating-point
aggregates, described below.)
If a floating-point actual parameter is known to correspond to
a variable-argument specification in the formal parameter list,
the following rule applies:
c) The actual parameter is passed in the appropriate general
register(s).
If the compiler cannot determine, at the point of call,
whether the corresponding formal parameter is a varargs parameter,
it must generate code that satisfies both of the above conditions.
(The compiler’s determination may be based on prototype declarations,
language standard assumptions, analysis, or other user options or
information.)
"""
We have [c] case here and gcc uses only GR for parameter passing.
The change binds known variadic arguments ro GRs instead of FPs as those
are always expected to be initialized for all variadic call types.
This fixes all 10 failures on ia64-unknown-linux-gnu:
```
=== libffi Summary ===
-# of expected passes 1945
-# of unexpected failures 10
+
+# of expected passes 1955
```
[1]: https://www.intel.com/content/dam/www/public/us/en/documents/guides/itanium-software-runtime-architecture-guide.pdf
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
9429968b
|
2018-02-10T23:23:33
|
|
Merge pull request #403 from frida/fix/x86-sysv-pic-closure-regression
Fix x86 SysV closure in PIC mode
|
|
f08b2be6
|
2018-02-10T23:21:49
|
|
Merge pull request #405 from andreas-schwab/master
Fix passing struct by value on aarch64
|
|
482b37f0
|
2017-09-18T12:44:08
|
|
Fix passing struct by value on aarch64
This fixes the ctypes test in the python testsuite.
|
|
28d3b61b
|
2018-01-20T23:56:17
|
|
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.
|
|
c194448e
|
2018-01-10T09:38:15
|
|
adjust env usage in travis
|
|
5314b106
|
2018-01-10T07:22:51
|
|
test static lib
|
|
bec6135d
|
2018-01-10T07:20:04
|
|
Merge pull request #393 from thejunkjon/master
Linker error "recompile with -fPIC" for x86_64
|
|
f6ecf10c
|
2018-01-05T16:51:44
|
|
Merge pull request #401 from wzssyqa/jr-r6
mips/ffi.c: fix encoding for jr on r6
|
|
746dbe3a
|
2018-01-03T10:07:41
|
|
mips/ffi.c: fix encoding for jr on r6
mips/ffi.c: instruction jr has a different encoding for r6
|
|
c50ba182
|
2018-01-01T15:18:46
|
|
Merge pull request #398 from emaste/master
Enable symbol versioning when ld is LLVM's lld
|
|
54cb3e23
|
2017-12-31T07:46:05
|
|
Merge pull request #396 from wzssyqa/master
mips/n32.S: disable .set mips4 on mips r6
|
|
af6949b7
|
2017-12-17T23:08:12
|
|
Enable symbol versioning when ld is LLVM's lld
Fixes #397
|
|
94c102aa
|
2017-12-10T14:25:01
|
|
Not set mips 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.
|
|
d15581c6
|
2017-12-01T00:34:30
|
|
Updating calls to ffi_closure_unix64_inner and ffi_closure_win64_inner to 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)'
|
|
716bfd83
|
2017-11-05T09:02:37
|
|
Merge pull request #387 from trofi/master
Makefile.am: add 'src/s390/internal.h' to source tarball
|
|
cd5e9f8b
|
2017-11-05T13:56:42
|
|
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>
|
|
4fdbb057
|
2017-11-03T07:05:31
|
|
Merge pull request #320 from 0-wiz-0/master
Support NetBSD with mprotect.
|
|
b302bc3d
|
2017-11-03T07:03:55
|
|
Merge pull request #322 from compnerd/aarch64-base
aarch64: fix index base register for AArch64
|
|
14eac938
|
2017-11-03T06:49:03
|
|
Merge pull request #384 from yan12125/fix-sgidefs-checking
Fix linux detection (closes #303)
|
|
9fc9dc53
|
2017-10-27T16:12:56
|
|
Fix linux detection (closes #303)
|
|
1fb788ac
|
2017-10-10T11:37:00
|
|
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.
|
|
ad15ae76
|
2017-10-25T13:16:49
|
|
Merge pull request #298 from frida/fix/ios-trampoline-table-complexity
Simplify iOS trampoline table allocation
|
|
dc2ff5ba
|
2017-10-25T13:11:40
|
|
Merge pull request #323 from compnerd/x86-alloca-alignment
x86: align alloca to 16-byte boundary
|
|
927da716
|
2017-10-25T13:05:53
|
|
Merge pull request #379 from jlj/master
Xcode build improvements
|
|
a0455c03
|
2017-10-25T13:04:23
|
|
Merge pull request #383 from hjl-tools/hjl/master
Hjl/master
|
|
0faf6145
|
2017-10-25T13:03:55
|
|
Merge pull request #381 from compnerd/ffi-nullptr-deref
arm: fix a level of indirection issue
|
|
9d9d92b4
|
2017-10-25T04:59:31
|
|
Skip WIN64/EFI64 support for x32
Since x32 doesn't support WIN64/EFI64, skip it if __ILP32__ is defined.
|
|
b2a343ff
|
2017-10-25T04:36:49
|
|
Don't include WIN64/EFI64 for x32
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.
|
|
3c372c38
|
2017-10-24T13:53:56
|
|
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.
|
|
181fc4cc
|
2017-10-23T15:02:29
|
|
Merge branch 'master' based on ksjogo/libffi
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
|
|
54529ba1
|
2017-10-23T09:49:35
|
|
Added a tvOS target in Xcode project. Misc Xcode project cleanup.
|
|
79d1509c
|
2017-10-10T11:39:45
|
|
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.
|
|
8d26e8c6
|
2017-10-17T10:46:49
|
|
Merge pull request #326 from trofi/master
src/ia64/unix.S: unbreak small struct handling
|
|
ed7488c0
|
2017-10-17T13:00:51
|
|
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>
|
|
1c9171ec
|
2017-10-10T23:19:57
|
|
Merge pull request #324 from compnerd/arm-zext
arm: zext return value parameters
|
|
7ad0ae7f
|
2017-10-10T11:44:05
|
|
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.
|
|
2bfcd299
|
2017-10-02T15:34:03
|
|
Support NetBSD with mprotect.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|
9f1f8741
|
2017-10-01T20:25:50
|
|
Merge pull request #319 from angerman/patch-5
Adds `local.exp` to DISTCLEANFILES
|
|
6cf0dea7
|
2017-10-02T10:20:16
|
|
Change CLEANFILES to DISTCLEANFILES
|
|
dca078f4
|
2017-10-01T20:19:53
|
|
Merge pull request #316 from angerman/patch-2
Add `configure.host` and `libtool-version` to the `EXTRA_DIST` files
|
|
540258d1
|
2017-10-01T20:17:02
|
|
Merge pull request #317 from angerman/patch-3
Add src/x86/asmnames.h to noinst_HEADERS
|
|
bccba9a3
|
2017-10-01T12:48:17
|
|
Merged
|
|
6b6df1a7
|
2017-10-01T12:37:53
|
|
Adds `local.exp` to CLEANFILES
With #315, #316, #317, #318 and this patch, running
```
AM_DISTCHECK_CONFIGURE_FLAGS=--disable-docs make distcheck
```
should complete successfully.
|
|
59d65d74
|
2017-10-01T12:23:31
|
|
Include `libtool-version` in the EXTRA_DIST files.
|
|
4c6aa78d
|
2017-10-01T11:32:41
|
|
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.
|
|
a1e6ccb6
|
2017-10-01T11:28:40
|
|
Add `configure.host` 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.
|
|
93d8e7dd
|
2017-09-27T21:51:34
|
|
Fix #265
|
|
02a5145a
|
2017-09-27T21:43:03
|
|
Merge pull request #263 from ksjogo/master
fix ios builds
|
|
10099d6c
|
2017-09-27T20:54:09
|
|
Merge pull request #271 from frida/fix/qnx-cache-flushing
arm: Fix cache flushing on QNX
|
|
c8f1aa3d
|
2017-09-27T20:53:50
|
|
Merge pull request #307 from zw3rk/master
Support -ios triple
|
|
db4dad97
|
2017-09-27T20:47:08
|
|
Merge pull request #312 from fjricci/fix_ub
Fix misaligned memory access in ffi_call_int
|
|
8a16f2f4
|
2017-09-27T20:45:15
|
|
Merge pull request #308 from trex58/master
This patch enables FFI Go Closure on AIX.
|
|
a78da739
|
2017-09-04T15:55:34
|
|
Fix macOS build target in Xcode project.
- 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.
|
|
9c12209d
|
2017-08-03T10:46:28
|
|
Fix misaligned memory access in ffi_call_int
|
|
b2309106
|
2017-07-12T12:43:06
|
|
Merge pull request #309 from rurban/oldgcc
__attribute__ deprecated (msg) only since gcc 4.5
|
|
9c6cb588
|
2017-06-18T18:26:05
|
|
__attribute__ deprecated (msg) only since gcc 4.5
make it work with older compilers
|
|
50e408ce
|
2017-05-21T20:44:10
|
|
add i?86-*-ios -- the iOS simulator (32bit)
|
|
a08cabe6
|
2017-05-21T20:25:16
|
|
add x86_64-*-ios -- the iOS simulator
|
|
0ff9419f
|
2017-05-17T14:57:53
|
|
This patch enables FFI Go Closure on AIX.
|
|
19ab448d
|
2017-05-16T08:32:06
|
|
Support -ios triple
Autoconf hasn’t had an update since 2014, and it doesn’t look like it will soon[1]
This updates config.{guess,sub}
It adds support for e.g. `-ios`, which allows to have targets like `aarch64-apple-ios`.
It basically does exactly what the config.guess script says:
> It is advised that you download the most up to date version of the config scripts from
The configure.ac script has been updated to relax `*-apple-darwin*` to `*-apple-*`.
Similarly the `.gitignore` and `autogen.sh` needed to be updated to respect the
newer `config.{sub,guess}`
—
[1]: http://lists.gnu.org/archive/html/autoconf/2016-07/msg00017.html
|
|
c0cc9f1d
|
2017-05-08T15:20:39
|
|
Merge pull request #302 from gpakosz/align-macros
Prefix ALIGN macros with FFI_
|
|
bd72848c
|
2017-04-27T13:20:36
|
|
Prefix ALIGN macros with FFI_
|
|
7d504f7a
|
2017-03-30T13:32:58
|
|
update for xcode 8.3
|
|
57d8ff04
|
2017-03-15T01:43:11
|
|
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.
|
|
7f558a9b
|
2016-07-25T01:18:30
|
|
set ios deployment target to 7.0
|
|
e76fa94b
|
2016-07-14T11:28:18
|
|
fix ltmain.sh in xcode builds
|
|
22b2fd6f
|
2016-07-13T14:40:07
|
|
add valid architectures
|
|
00406945
|
2016-07-12T16:08:42
|
|
Update Xcodeproj
Include all currently relevent files.
Call autogen is build script.
Fix compiler settings.
Fix mach include.
|
|
b841ae70
|
2017-03-19T07:42:09
|
|
remove stray quote
|
|
a94c999b
|
2017-03-19T07:36:07
|
|
Handle fastcall declaration differently for some Microsoft compilers
|
|
69963d39
|
2017-03-19T07:33:39
|
|
We don't support 32-bit builds with the Microsoft toolchain
|
|
073bc9d5
|
2017-03-19T07:25:24
|
|
Enable appveyor ci support
|
|
a0b14eea
|
2017-03-17T09:20:40
|
|
Merge pull request #291 from ramon-garcia/visual-studio-build
Build with Visual C++ (64 bits)
|
|
fa5a0fe2
|
2017-03-16T07:50:07
|
|
Merge pull request #238 from KubaKaszycki/master
Update README with a new port
|
|
5b91bbd3
|
2017-03-16T00:40:58
|
|
Merge pull request #288 from yan12125/std-includedir
Install public headers in the standard path
|
|
d754c510
|
2017-03-16T00:39:07
|
|
Merge pull request #299 from matijaskala/patch-1
detect other x32 hosts
|
|
ebe7f447
|
2017-03-16T00:36:10
|
|
Remove osx testing. gcc was symlinked to clang. dejagnu c++ tests fail with clang.
|
|
c9c2aa24
|
2017-03-15T09:58:39
|
|
Revert previous two changes. clang/MacOS problem can only be solved within dejagnu.
|