kc3-lang/libffi

Branch :


Log

Author Commit Date CI Message
26d7be77 2025-06-09 18:23:15 ci: update build.sh for Linux build process
a18d4e95 2025-06-09 13:35:29 feat(.github/workflows): add step to wipe old snapshot assets in tarball.yml
b9b83785 2025-06-09 13:29:03 fix(github-actions): correct regex in version extraction
7ac6f145 2025-06-09 13:08:02 ci: change packages installed during workflow
ceab352d 2025-06-09 13:01:50 ci: add installation of necessary tools to tarball workflow
1f73aa50 2025-06-09 12:56:19 refactor(.github/workflows/tarball): remove repeated job blocks
7f5375d7 2025-06-09 12:55:09 chore(workflows): update snapshot release description in tarball.yml
2a5195bb 2025-06-09 12:54:55 chore(.github/workflows): update tarball.yml indentation
2f535b8f 2025-06-09 12:52:43 chore(ci): update tarball workflow in GitHub Actions
172bfb41 2025-06-09 12:22:35 chore(.github/workflows): update tarball workflow to use softprops/action-gh-release
0947743f 2025-06-09 11:53:15 Make tarballs (#924) * Create tarballs in CI
a46977da 2025-06-09 15:55:02 Downgrade Autoconf requirement to version 2.68 (#922) * Downgrade Autoconf requirement to version 2.68 * CI: remove redundant Autoconf install scripts
40a76827 2025-06-09 09:49:00 Improve CI test coverage (#923) Add CI testing on Windows with both gcc and clang.
64a42f61 2025-06-08 16: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
d2c78d2e 2025-06-08 08:16:42 feat(testsuite): exclude wasm from pthreads testing in libffi
668e2162 2025-06-08 08:00:36 refactor(threads): don't run tests on windows
5be311be 2025-06-08 07:56:37 refactor: add POSIX barriers to libffi.threads testsuite
70b34efe 2025-06-08 07:53:00 feat(testsuite): add -lpthread flag for wasm32 targets
f530522c 2025-06-08 07:52:25 chore: disable color diagnostics in libffi tests
5fd81214 2025-06-08 07:47:04 chore: update documentation date and add test files to Makefile
a5d46502 2025-06-08 07:40:39 feat(testsuite): add new threading tests to libffi test suite
074c423f 2025-06-08 07:30:54 feat: Add ffi_get_default_abi and ffi_get_closure_size functions
b14d4379 2025-06-08 06:53:12 Update version
c8225fb0 2025-06-08 06:51:58 chore: update libffi version to 3.5.0
cb424c6d 2025-06-08 06:50:47 docs: Update README with release details for version 3.5.0
8b0eab28 2025-06-08 12:16:38 Update License date and improve rcedit DLL metadata (#919) * rcedit add architecture and original filename * Update LICENSE to 2025
8b30fe51 2025-06-07 08:51:52 ci: add user configuration for DejaGNU tests in ppc64le container
58f91790 2025-06-07 08:48:41 ci: add diffutils and gawk to ppc64le container dependencies
d796b1ba 2025-06-07 08:47:04 feat(.ci): add libtool to ppc64le container setup
024cbc25 2025-06-07 08:35:15 feat(.ci): add Containerfile for ppc64le architecture
e3cbebff 2025-06-06 22: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
9bb21f1d 2025-06-06 13:48:25 fix: correct path in LDFLAGS line of build.yml workflow
c2ae66fc 2025-06-06 13:41:56 fix(build): change version.o to version.obj in build.yml
d326a4c0 2025-06-05 09:35:47 refactor: simplify versioning in .github/workflows/build.yml
d241e510 2025-06-05 09:22:10 chore(build): update build script to use object file for versioning
c07b0c4d 2025-06-05 08:52:41 fix(github workflows): correct LDFLAGS path in build.yml
ec22d0fe 2025-06-05 08:44:36 build(.github/workflows): include build number in version info
e133ee84 2025-06-05 07:42:52 chore(build): add command to log version information in build script
c8d929fc 2025-06-05 07:33:57 ci: add version logging in build workflow
d6029210 2025-06-05 07:11:43 ci: refactor version retrieval in build workflow
49c70cab 2025-06-05 06:57:20 fix(build): correct variables for FILEVERSION and PRODUCTVERSION
27f93a70 2025-06-05 06:50:12 feat(build): add version information resource to build script and update documentation version
1b6b176a 2025-06-05 06:17:56 Update README.md to mention SH targets
bac99f2f 2025-06-05 06: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
3c54639e 2025-06-04 19:20:37 refactor(ci): improve wget retry logic in .ci/install.sh (#915)
d6b1f342 2025-06-04 11:24:11 refactor: move and modify unix-noexec.exp and site.exp files
d38abaf9 2025-06-04 07:57:21 feat(testsuite): add Emscripten support to libffi.closures tests
2d8868ac 2025-06-04 07:04:53 Update generate-darwin-source-and-headers.py (#914)
5ad529fb 2025-06-03 19:12:49 Many CI testing fixes and improvements. (#913)
2529b40d 2025-06-02 20:42:47 chore: update version to 3.5.0-rc0 in documentation and configuration files
3ee0dc41 2025-06-02 20:41:27 chore: update version to 3.5.0-pre0 in version.texi
55d84b0c 2025-06-02 20:40:44 docs: update README with new libffi release information
854ce7be 2025-06-02 20: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.
022929b1 2025-06-01 13:30:51 doc now shows the correct calculation for version number (#911)
dcc9e93b 2025-05-28 14:32:02 Add Issue labeler Action
9ee7341d 2025-05-26 08:19:32 feat(README): add details for next version release in history section
4094362f 2025-05-26 08:19:15 refactor: enhance assembler pseudo-ops and compiler flag checking
be4e59e3 2025-05-26 08:19:00 chore: update version to 3.5.0 and libtool version to 10:0:2
dc9b1332 2025-05-26 08:18:40 chore: update Makefile.am configurations
c9a3a06f 2025-05-26 08:18:13 feat(libffi): upgrade to version 3.5.0 and add version API
64d5e122 2025-05-25 16:09:59 docs: update required installations in README.md
5b253476 2025-05-25 13:33:51 chore(testsuite): remove mingw64-align.c from Makefile and delete file
f9c60855 2025-05-24 08:11:37 Add custom github issue labels for gail
c6f16105 2025-04-27 08:59:12 feat(testsuite): add mingw64-align.c to test alignment in structs
571177ad 2025-04-27 08:30:35 feat(testsuite): add longjmp test to Makefile and implement longjmp test code
562cb53b 2025-04-25 05:07:57 Add initializer (#904)
aea22de2 2025-04-18 10: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.
a431b478 2025-04-15 10: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
6a99edb8 2025-04-10 03: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
bfb5b005 2025-04-09 10:32:42 feat: Update version of libffi to 3.4.8 with various fixes and enhancements
3429ed6b 2025-04-08 05: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.
bb1a84ed 2025-03-30 12: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>
fe203ffb 2025-03-27 01: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>
cf69efab 2025-03-08 14: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
89c99d73 2025-02-28 22: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
5ceddf40 2025-02-20 04: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>
1716f81e 2025-02-08 11:32:05 feat: remove nios2 support Acked-by: Anthony Green <green@moxielogic.com>
252c0f46 2025-02-08 09:37:31 chore: Bump version to 3.4.7 and update change log
adfe4489 2025-01-31 21: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`
2f34cf63 2025-01-31 13:40:40 x86 Darwin returns structs of size 1, 2, 4, and 8 in registers (#876)
a0d8074a 2025-01-31 21: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-13 18:38:01 Fix config.sub on Apple platforms (#860) * update config.sub * update config.sub
593cb01a 2024-12-13 05:37:15 Add mold linker to linker checks. (#866) Signed-off-by: Satadru Pramanik <satadru@gmail.com>
f515eac0 2024-12-13 18: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>
458b2ae2 2024-11-16 13:03:24 Add static trampoline support for s390 (#862) * added static trampoline support for s390 * enable static tramp only for s390x 64bit
0859f843 2024-10-24 18: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`.
8308bed5 2024-09-20 06: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.
01db744b 2024-09-20 20: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.
f7e49927 2024-09-20 10:58:06 testsuite: fix dejagnu directive typo (#859)
084f3690 2024-09-15 12:32:58 Merge remote-tracking branch 'refs/remotes/origin/master'
92d384df 2024-09-15 12:32:29 Fix floating point compare
348e70ef 2024-09-15 07:39:51 Suppress unused variable warning in dlmalloc.c (#843) Allows `-Wunused-but-set-variable` to pass
30e887f8 2024-09-15 14: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>
377a1369 2024-09-15 07: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>
c7437f67 2024-09-15 13: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`.
63b925fe 2024-09-15 07:32:50 feat(testsuite): add struct_int_float.c to Makefile.am
efb98a72 2024-09-15 07:31:33 Robustify floating point comparison in test
d21881f5 2024-09-15 13: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
8a0d0292 2024-09-15 13: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>
8e3ef965 2024-06-28 04:07:09 Fix struct args (Rainer Orth)