Log

Author Commit Date CI Message
Anthony Green b9b83785 2025-06-09T13:29:03 fix(github-actions): correct regex in version extraction
Anthony Green 7ac6f145 2025-06-09T13:08:02 ci: change packages installed during workflow
Anthony Green ceab352d 2025-06-09T13:01:50 ci: add installation of necessary tools to tarball workflow
Anthony Green 1f73aa50 2025-06-09T12:56:19 refactor(.github/workflows/tarball): remove repeated job blocks
Anthony Green 7f5375d7 2025-06-09T12:55:09 chore(workflows): update snapshot release description in tarball.yml
Anthony Green 2a5195bb 2025-06-09T12:54:55 chore(.github/workflows): update tarball.yml indentation
Anthony Green 2f535b8f 2025-06-09T12:52:43 chore(ci): update tarball workflow in GitHub Actions
Anthony Green 172bfb41 2025-06-09T12:22:35 chore(.github/workflows): update tarball workflow to use softprops/action-gh-release
Anthony Green 0947743f 2025-06-09T11:53:15 Make tarballs (#924) * Create tarballs in CI
Kleis Auke Wolthuizen a46977da 2025-06-09T15:55:02 Downgrade Autoconf requirement to version 2.68 (#922) * Downgrade Autoconf requirement to version 2.68 * CI: remove redundant Autoconf install scripts
Anthony Green 40a76827 2025-06-09T09:49:00 Improve CI test coverage (#923) Add CI testing on Windows with both gcc and clang.
Anthony Green 64a42f61 2025-06-08T16:59:58 More CI testing (#921) * ci: add new build configuration in GitHub Actions * ci: add Windows clang build workflow * ci: add additional packages to GitHub workflows build * ci: optimize build workflow and improve commenting * ci: remove unused MSVC dev command from build workflow * ci: modify build workflow to support multiple compilers * build(github-actions): use matrix.compiler for CC and CXX variables
Anthony Green d2c78d2e 2025-06-08T08:16:42 feat(testsuite): exclude wasm from pthreads testing in libffi
Anthony Green 668e2162 2025-06-08T08:00:36 refactor(threads): don't run tests on windows
Anthony Green 5be311be 2025-06-08T07:56:37 refactor: add POSIX barriers to libffi.threads testsuite
Anthony Green 70b34efe 2025-06-08T07:53:00 feat(testsuite): add -lpthread flag for wasm32 targets
Anthony Green f530522c 2025-06-08T07:52:25 chore: disable color diagnostics in libffi tests
Anthony Green 5fd81214 2025-06-08T07:47:04 chore: update documentation date and add test files to Makefile
Anthony Green a5d46502 2025-06-08T07:40:39 feat(testsuite): add new threading tests to libffi test suite
Anthony Green 074c423f 2025-06-08T07:30:54 feat: Add ffi_get_default_abi and ffi_get_closure_size functions
Anthony Green b14d4379 2025-06-08T06:53:12 Update version
Anthony Green c8225fb0 2025-06-08T06:51:58 chore: update libffi version to 3.5.0
Anthony Green cb424c6d 2025-06-08T06:50:47 docs: Update README with release details for version 3.5.0
JupiterRider 8b0eab28 2025-06-08T12:16:38 Update License date and improve rcedit DLL metadata (#919) * rcedit add architecture and original filename * Update LICENSE to 2025
Anthony Green 8b30fe51 2025-06-07T08:51:52 ci: add user configuration for DejaGNU tests in ppc64le container
Anthony Green 58f91790 2025-06-07T08:48:41 ci: add diffutils and gawk to ppc64le container dependencies
Anthony Green d796b1ba 2025-06-07T08:47:04 feat(.ci): add libtool to ppc64le container setup
Anthony Green 024cbc25 2025-06-07T08:35:15 feat(.ci): add Containerfile for ppc64le architecture
JupiterRider e3cbebff 2025-06-06T22:40:40 use rcedit to add metainfo to DLL (#918) * use rcedit to add metainfo to DLL * remove trailing backslash in build.yml * build.yml: add rcedit execute permission * build.yml: cd to the right directory
Anthony Green 9bb21f1d 2025-06-06T13:48:25 fix: correct path in LDFLAGS line of build.yml workflow
Anthony Green c2ae66fc 2025-06-06T13:41:56 fix(build): change version.o to version.obj in build.yml
Anthony Green d326a4c0 2025-06-05T09:35:47 refactor: simplify versioning in .github/workflows/build.yml
Anthony Green d241e510 2025-06-05T09:22:10 chore(build): update build script to use object file for versioning
Anthony Green c07b0c4d 2025-06-05T08:52:41 fix(github workflows): correct LDFLAGS path in build.yml
Anthony Green ec22d0fe 2025-06-05T08:44:36 build(.github/workflows): include build number in version info
Anthony Green e133ee84 2025-06-05T07:42:52 chore(build): add command to log version information in build script
Anthony Green c8d929fc 2025-06-05T07:33:57 ci: add version logging in build workflow
Anthony Green d6029210 2025-06-05T07:11:43 ci: refactor version retrieval in build workflow
Anthony Green 49c70cab 2025-06-05T06:57:20 fix(build): correct variables for FILEVERSION and PRODUCTVERSION
Anthony Green 27f93a70 2025-06-05T06:50:12 feat(build): add version information resource to build script and update documentation version
Anthony Green 1b6b176a 2025-06-05T06:17:56 Update README.md to mention SH targets
Anthony Green bac99f2f 2025-06-05T06:12:10 Release candidate 1 for 3.5.0. Windows build fixes. (#916) * refactor(ci): improve wget retry logic in .ci/install.sh * build(github-actions): use static runtime library in build * refactor(ffi.h.in): export version API * chore: update libffi version to 3.5.0-rc1
Anthony Green 3c54639e 2025-06-04T19:20:37 refactor(ci): improve wget retry logic in .ci/install.sh (#915)
Anthony Green d6b1f342 2025-06-04T11:24:11 refactor: move and modify unix-noexec.exp and site.exp files
Anthony Green d38abaf9 2025-06-04T07:57:21 feat(testsuite): add Emscripten support to libffi.closures tests
Anthony Green 2d8868ac 2025-06-04T07:04:53 Update generate-darwin-source-and-headers.py (#914)
Anthony Green 5ad529fb 2025-06-03T19:12:49 Many CI testing fixes and improvements. (#913)
Anthony Green 2529b40d 2025-06-02T20:42:47 chore: update version to 3.5.0-rc0 in documentation and configuration files
Anthony Green 3ee0dc41 2025-06-02T20:41:27 chore: update version to 3.5.0-pre0 in version.texi
Anthony Green 55d84b0c 2025-06-02T20:40:44 docs: update README with new libffi release information
Anthony Green 854ce7be 2025-06-02T20:18:46 Make 3.5.0-pre0 release. Build and publish Windows binaries. Clean up testing. (#912) This commit removes many platforms from the testing workflow. They will be added back in future commits.
JupiterRider 022929b1 2025-06-01T13:30:51 doc now shows the correct calculation for version number (#911)
Anthony Green dcc9e93b 2025-05-28T14:32:02 Add Issue labeler Action
Anthony Green 9ee7341d 2025-05-26T08:19:32 feat(README): add details for next version release in history section
Anthony Green 4094362f 2025-05-26T08:19:15 refactor: enhance assembler pseudo-ops and compiler flag checking
Anthony Green be4e59e3 2025-05-26T08:19:00 chore: update version to 3.5.0 and libtool version to 10:0:2
Anthony Green dc9b1332 2025-05-26T08:18:40 chore: update Makefile.am configurations
Anthony Green c9a3a06f 2025-05-26T08:18:13 feat(libffi): upgrade to version 3.5.0 and add version API
Anthony Green 64d5e122 2025-05-25T16:09:59 docs: update required installations in README.md
Anthony Green 5b253476 2025-05-25T13:33:51 chore(testsuite): remove mingw64-align.c from Makefile and delete file
Anthony Green f9c60855 2025-05-24T08:11:37 Add custom github issue labels for gail
Anthony Green c6f16105 2025-04-27T08:59:12 feat(testsuite): add mingw64-align.c to test alignment in structs
Anthony Green 571177ad 2025-04-27T08:30:35 feat(testsuite): add longjmp test to Makefile and implement longjmp test code
David Tenty 562cb53b 2025-04-25T05:07:57 Add initializer (#904)
Peter Bergner aea22de2 2025-04-18T10:09:45 powerpc: Fix closures on powerpc64-linux when statically linking (#900) (#902) Closures on powerpc64-linux using static trampolines do not work when statically linking libffi. The problem is the usage of tramp_globals.text in libffi assumes it contains the entry point address of the first trampoline. Powerpc's ffi_tramp_arch code returns &trampoline_code_table which for ABIs that use function descriptors, ends up returning trampoline_code_table's function descriptor address instead of its entry point address. Update the code to always return the entry point address for all ABIs.
Sam James a431b478 2025-04-15T10:30:27 pa: add .note.GNU-stack marker to linux.S (#899) Similarly to f515eac04cf8e5f594d5d9dee5fb7dfc3a186a4c, add a .note.GNU-stack marker to pa/linux.S as it doesn't need an executable stack. Absence of the note means that GNU Binutils will consider it as needing an executable stack and mark it as such automatically. When building libffi on HPPA with `-Wl,--warn-warn-execstack`, we get: ``` ld: warning: src/pa/.libs/linux.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker ``` That becomes more problematic with glibc-2.41 which forbids dlopen() of a library with an executable stack, and libffi is commonly dlopen()'d, especially by Python. I suspect the reason it didn't show up on Debian is that since February, Debian has been building Binutils with --disable-default-execstack. Bug: https://bugs.gentoo.org/953805 Bug: https://github.com/libffi/libffi/issues/898
Sam James 6a99edb8 2025-04-10T03:44:45 testsuite: add two tests to Makefile.am (#893) * Add libffi.call/overread.c and libffi.call/x32.c to Makefile.am so they're included in dist tarballs * Fix indentation and rewrap
Anthony Green bfb5b005 2025-04-09T10:32:42 feat: Update version of libffi to 3.4.8 with various fixes and enhancements
Peter Bergner 3429ed6b 2025-04-08T05:52:37 powerpc: Add static trampoline support (#894) (#895) Add static trampoline support to all three powerpc Linux ABIs, specifically powerpc-linux (32-bit SYSV BE), powerpc64-linux (64-bit ELFv1 BE) and powerpc64le-linux (64-bit ELFv2 LE). This follows the s390x implementation and does not introduce a ffi_closure_*_alt function, but rather jumps directly to the ffi_closure_* function itself. If compiling with --with-gcc-arch=power10 and pc-relative is enabled, we use a simpler and smaller trampoline that utilizes Power10's new pc-relative load instructions.
mikulas-patocka bb1a84ed 2025-03-30T12:07:59 Add the "ABI_ATTR" attribute to called functions (#891) (#892) I accidentally omitted the "ABI_ATTR" attribute, so that the testsuite fails when testing the Microsoft ABI. Fixes: fe203ffbb2bd ("Fix bugs in the x86-64 and x32 target (#887) (#889)") Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
mikulas-patocka fe203ffb 2025-03-27T01:31:49 Fix bugs in the x86-64 and x32 target (#887) (#889) This commit fixes two bugs in ffi in the x86-64 target. The bugs were introduced by the commit d21881f55ed4a44d464c9091871e69b0bb47611a ("Fix x86/ffi64 calls with 6 gp and some sse registers"). The first bug is that when we pass an argument with less than 8 bytes, ffi will read memory beyond argument end, causing a crash if the argument is located just before the end of the mapped region. The second bug is in the x32 ABI - pointers in x32 are 4-byte, but GCC assumes that the pointer values in the registers are zero-extended. ffi doesn't respect this assumption, causing crashes in the called library. For example, when we compile this function for x32: int fn(int *a) { if (a) return *a; return -1; } we get this code: fn: testq %rdi, %rdi je .L3 movl (%edi), %eax ret .L3: movl $-1, %eax ret When we call this function using ffi with the argument NULL, the function crashes because top 4 bytes of the RDI register are not cleared. Fixes: d21881f55ed4 ("Fix x86/ffi64 calls with 6 gp and some sse registers (#848)") Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
Nikita Samusev cf69efab 2025-03-08T14:41:02 Update the Simple Example to fix a compile error (#886) Fixes the following error: candidate function not viable: no known conversion from 'int (const char *)' to 'void (*)()' for 2nd argument
fossdd 89c99d73 2025-02-28T22:10:10 MIPS: Dont import asm/sgidefs.h on linux (#885) Removed from Linux since Linux 3.7 Ref: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=61730c538f8281efa7ac12596da9f3f9a31b9272
Bill Roberts 5ceddf40 2025-02-20T04:25:21 aarch64: add PAC to GNU Notes (#882) While PAC was enabled, the bit to indicate support in the GNU Notes section of the ELF was missing. Before: readelf -n ./aarch64-unknown-linux-gnu/.libs/libffi.so Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 Properties: AArch64 feature: BTI This was caused by this file not having PAC indicated in GNU Notes and the linker discarding it: File: ./aarch64-unknown-linux-gnu/src/aarch64/sysv.o Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 Properties: AArch64 feature: BTI Now it has it: File: ./aarch64-unknown-linux-gnu/src/aarch64/sysv.o Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 Properties: AArch64 feature: BTI, PAC As well as the output shared object: readelf -n ./aarch64-unknown-linux-gnu/.libs/libffi.so Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 Properties: AArch64 feature: BTI, PAC Fixes: #881 Signed-off-by: Bill Roberts <bill.roberts@arm.com>
Anthony Green 1716f81e 2025-02-08T11:32:05 feat: remove nios2 support Acked-by: Anthony Green <green@moxielogic.com>
Anthony Green 252c0f46 2025-02-08T09:37:31 chore: Bump version to 3.4.7 and update change log
Kleis Auke Wolthuizen adfe4489 2025-01-31T21:41:56 Emscripten: remove support for `-sWASM_BIGINT=0` (#874) * Emscripten: cleanup * Emscripten: remove support for `-sWASM_BIGINT=0` * Emscripten: remove redundant CircleCI config * Emscripten: modernize CI * Ensure test helper methods are static Similar to #644. * Fix test failures in `cls_multi_{s,u}shortchar`
Matthew Flatt 2f34cf63 2025-01-31T13:40:40 x86 Darwin returns structs of size 1, 2, 4, and 8 in registers (#876)
zye2-sc a0d8074a 2025-01-31T21:40:00 Disable go closures on Android (#877) * x18 register shouldn't be used on Android due to the shadow call stack feature in llvm * https://source.android.com/docs/security/test/shadow-call-stack
杨萧玉 d77b9fef 2024-12-13T18:38:01 Fix config.sub on Apple platforms (#860) * update config.sub * update config.sub
Satadru Pramanik, DO, MPH, MEng 593cb01a 2024-12-13T05:37:15 Add mold linker to linker checks. (#866) Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Icenowy Zheng f515eac0 2024-12-13T18:36:02 MIPS: add .note.GNU-stack section to assembly sources (#872) To build ELF shared libraries that do not require executable stack on MIPS, every object file linked should have a .note.GNU-stack section, otherwise the linker defaults to executable stack. As libffi shouldn't require executable stack, add the .note.GNU-stack section to the assembly source files under src/mips, like other architectures. Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Eddy S. 458b2ae2 2024-11-16T13:03:24 Add static trampoline support for s390 (#862) * added static trampoline support for s390 * enable static tramp only for s390x 64bit
Joseph Myers 0859f843 2024-10-24T18:26:58 Fix testsuite for C23 `va_start` (#861) In the C23 revision of the C standard, `va_start` ignores its second argument, which is no longer required (previously the last named function parameter - which the compiler knows anyway, so it's redundant information). This has the consequence for the libffi testsuite, when making GCC default to `-std=gnu23`, of making two tests fail with warnings about an unused function argument (only passed to `va_start` and not otherwise used). Fix those test failures by explicitly casting the argument to `void`.
Ivan Tadeu Ferreira Antunes Filho 8308bed5 2024-09-20T06:01:23 Move cfi_startproc after CNAME(label) (#857) This is a fix for https://github.com/libffi/libffi/issues/852: error: invalid CFI advance_loc expression on apple targets. The CFI for darwin arm64 was broken because the CNAME macro was being used after the cfi_startproc macro.
KJ Tsanaktsidis 01db744b 2024-09-20T20:00:49 Disable ASAN in ffi_call_int functions (#858) The pattern for several of the architectures is for ffi_call_int to stack-allocate some arguments + the registers, and then ffi_call_$ARCH will pop the top of that structure into registers, and then adjust the stack pointer such that the alloca'd buffer _becomes_ the stack-passed arguments for the function being called. If libffi is compiled with ASAN, then there will be a redzone inserted after the alloca'd buffer which is marked as poisoned. This redzone appears beyond the end of $sp upon entry to the called function. If the called function does anything to use this stack memory, ASAN will notice that it's poisoned and report an error. This commit fixes the situation (on the architectures that I have access to) disabling instrumentation for ffi_call_int; that means there will be no alloca redzone left on the shadow-stack.
Sam James f7e49927 2024-09-20T10:58:06 testsuite: fix dejagnu directive typo (#859)
Anthony Green 084f3690 2024-09-15T12:32:58 Merge remote-tracking branch 'refs/remotes/origin/master'
Anthony Green 92d384df 2024-09-15T12:32:29 Fix floating point compare
Richard Barnes 348e70ef 2024-09-15T07:39:51 Suppress unused variable warning in dlmalloc.c (#843) Allows `-Wunused-but-set-variable` to pass
Yuriy Kolerov 30e887f8 2024-09-15T14:39:01 A series of fixes for ARC port (#844) * arc: Fix warnings These warnings are fixed: 1. A series of "unused variables". 2. Implicit conversion from a pointer to uint32_t. Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com> * arc: Do not use mov_s and movl_s instructions mov_s and movl_s instructions use a restricted set of registers. However, a list of available registers for such instructions for one ARC target may not match a list for another ARC targets. For example, it is applicable to ARC700 and ARC HS3x/4x - build fails because mov_s formats may be incompatible in some cases. The easiest and the most straightforward way to fix this issue is to use mov and movl instead of mov_s and movl_s. Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com> --------- Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
dependabot[bot] 377a1369 2024-09-15T07:38:22 Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows (#856) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.1.7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4.1.7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Yury V. Zaytsev c7437f67 2024-09-15T13:37:28 configure: fix shared build on Solaris 10 (#846) GNU tools are often installed with g-prefix on Solaris. Unfortunately, a check in configure was using grep directly instead of through a variable, which lead to wrong results due to missing option `-q`. Additionally, the check will fail silently if `readelf` is not on `PATH` instead of trying `greadelf`.
Anthony Green 63b925fe 2024-09-15T07:32:50 feat(testsuite): add struct_int_float.c to Makefile.am
Anthony Green efb98a72 2024-09-15T07:31:33 Robustify floating point comparison in test
kellda d21881f5 2024-09-15T13:29:42 Fix x86/ffi64 calls with 6 gp and some sse registers (#848) * Fix x86/ffi64 calls with 6 gp and some sse registers * Add test demonstating issue when mixing gp and sse registers
Thomas Petazzoni 8a0d0292 2024-09-15T13:22:36 OpenRISC/or1k build fixes (#854) * src/or1k/ffi.c: fix prototype of ffi_call_SYSV() The current code base of libffi on OpenRISC (or1k) fails to build with GCC 14.x with the following error: ../src/or1k/ffi.c: In function 'ffi_call': ../src/or1k/ffi.c:167:34: error: passing argument 3 of 'ffi_call_SYSV' from incompatible pointer type [-Wincompatible-pointer-types] 167 | ffi_call_SYSV(size, &ecif, ffi_prep_args, rvalue, fn, cif->flags); | ^~~~~~~~~~~~~ | | | void * (*)(char *, extended_cif *) ../src/or1k/ffi.c:113:27: note: expected 'void * (*)(int *, extended_cif *)' but argument is of type 'void * (*)(char *, extended_cif *)' 113 | void *(*)(int *, extended_cif *), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is due to the fact that ffi_prep_args() is in fact defined as: void* ffi_prep_args(char *stack, extended_cif *ecif) so, let's fix the prototype of the function pointer, which anyway gets passed to assembly code, so the typing gets lost. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> * src/or1k/ffi.c: fix incompatible pointer type The current code base of libffi on OpenRISC (or1k) fails to build with GCC 14.x with the following error: ../src/or1k/ffi.c: In function 'ffi_closure_SYSV': ../src/or1k/ffi.c:183:22: error: initialization of 'char *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types] 183 | char *stack_args = sp; | ^~ Indeed: register int *sp __asm__ ("r17"); [..] char *stack_args = sp; Adopt the same logic used for: char *ptr = (char *) register_args; which consists in casting to the desired pointer type. Indeed, later in the code stack_args is assigned to ptr (so they need to be the same pointer type), and some arithmetic is done on ptr, so changing its pointer type would change the behavior. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --------- Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Anthony Green 8e3ef965 2024-06-28T04:07:09 Fix struct args (Rainer Orth)
Martin Storsjö 9c9e8368 2024-06-04T14:13:08 aarch64: Add a missing no-op define of SIGN_LR_LINUX_ONLY (#838) This is needed at least if building for Linux, with a toolchain that doesn't default to having PAC enabled, fixing build errors since 45d284f2d066cc3a080c5be88e51b4d934349797.
Anthony Green 6993bc14 2024-06-01T13:42:29 Import from upstream