|
cec3a3a2
|
2018-03-18T16:00:04
|
|
Don't align-double for 32-bit x86
|
|
f34f8039
|
2018-03-18T15:30:00
|
|
Remove debug output
|
|
f31b9153
|
2018-03-18T15:13:21
|
|
Add m4/ax_require_defined.m4
|
|
a2dc5848
|
2018-03-18T13:41:15
|
|
travis debug
|
|
81d345b2
|
2018-03-18T13:32:03
|
|
Update autoconf archive macros
|
|
369ef49f
|
2018-03-18T12:53:42
|
|
Add missing FFI_GNUW64 enum
|
|
56655e58
|
2018-03-18T12:34:18
|
|
Merge branch 'master' of github.com:/libffi/libffi
|
|
43980dd1
|
2018-03-18T12:32:10
|
|
Add FFI_GNUW64 ABI for GNU 80-bit long double support
|
|
9bc40d87
|
2018-03-18T12:32:10
|
|
Add FFI_GWIN64 ABI for GNU 80-bit long double support
|
|
d4640608
|
2018-03-18T07:00:42
|
|
Fully allocate file backing writable maps (#389)
When ftruncate() is used on a filesystem supporting sparse files,
space in the file is not actually allocated. Then, when the file
is mmap'd and libffi writes to the mapping, SIGBUS is thrown to
the calling application. Instead, always fully allocate the file
that will back writable maps.
|
|
247e44b3
|
2018-03-18T07:01:54
|
|
Fix return values
|
|
1f99701f
|
2018-03-17T22:49:58
|
|
Make tests compile/run standalone
|
|
d974207c
|
2018-03-17T09:03:42
|
|
Formatting fixes. Add 'bug fixes' note.
|
|
a33bfa9b
|
2018-03-17T07:17:24
|
|
xfail unwind tests for moxie
|
|
8bf05481
|
2018-03-16T23:54:28
|
|
Install moxie libstdc++
|
|
84b383ed
|
2018-03-16T23:36:51
|
|
Install moxie-elf-g++
|
|
6a801d04
|
2018-03-16T17:53:33
|
|
Fix closure case where 8-byte value is partially passed in register. Fixes cls_many_mixed_float_double test case.
|
|
0f0ba9e0
|
2018-03-16T07:28:33
|
|
Run dejagnu's runtest with -a option to prevent travis timeouts after 10min
|
|
72545419
|
2018-03-15T08:17:18
|
|
fix .travis.yml
|
|
d71051c4
|
2018-03-14T21:21:06
|
|
fix .travis.yml
|
|
e86aa54c
|
2018-03-14T21:00:55
|
|
fix .travis.yml
|
|
5b538ed6
|
2018-03-14T20:32:00
|
|
fix .travis.yml
|
|
6ed64a79
|
2018-03-14T20:22:33
|
|
fix .travis.yml
|
|
90809e92
|
2018-03-14T14:09:39
|
|
fix .travis.yml
|
|
85e4c623
|
2018-03-14T13:47:27
|
|
fix .travis.yml
|
|
aa8a5ec4
|
2018-03-14T13:25:04
|
|
fix .travis.yml
|
|
7c3e5da4
|
2018-03-14T13:07:04
|
|
fix .travis.yml
|
|
19aec198
|
2018-03-14T12:40:58
|
|
Fix travis.yml
|
|
bf337b07
|
2018-03-14T12:15:04
|
|
yaml syntax error fix
|
|
076d5a98
|
2018-03-14T11:13:32
|
|
markdown fixes
|
|
d2f7e788
|
2018-03-14T09:06:38
|
|
Fix test cases with short results
|
|
18fe1900
|
2018-03-14T08:02:10
|
|
Debug travis output
|
|
718a4177
|
2018-03-14T07:40:53
|
|
test
|
|
486c34b6
|
2018-03-13T23:31:18
|
|
debug
|
|
00464aa5
|
2018-03-13T23:30:52
|
|
debug
|
|
eb0544d0
|
2018-03-13T23:20:15
|
|
Debug env
|
|
9d5bd29d
|
2018-03-13T23:07:10
|
|
Refactor
|
|
52a364d7
|
2018-03-13T22:49:48
|
|
fix moxie build
|
|
1a32b3f1
|
2018-03-13T22:44:13
|
|
fix moxie build
|
|
e8958c3a
|
2018-03-13T22:36:41
|
|
revert test
|
|
58315ae1
|
2018-03-13T22:35:50
|
|
test
|
|
6239c287
|
2018-03-13T22:13:44
|
|
Add experimental moxie travis build
|
|
01db31d9
|
2018-03-13T20:41:55
|
|
Update moxie sub opcode
|
|
e8f5a430
|
2018-03-13T09:27:00
|
|
Fix appveyor badge
|
|
d1689dd3
|
2018-03-13T09:24:37
|
|
Fix travis badge. Add REAME.md to dist files
|
|
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
|