Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit 631d3aa

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update libffi to 3.8.0
PR-URL: #65154 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1aa78a commit 631d3aa

50 files changed

Lines changed: 2565 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/libffi/ChangeLog‎

Lines changed: 607 additions & 0 deletions
Large diffs are not rendered by default.

‎deps/libffi/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,28 @@ History
201201

202202
See the git log for details at http://github.com/libffi/libffi.
203203

204+
3.8.0 August-8-2026
205+
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
206+
layout, for aarch64 and x86-64 (#1000, closes #773).
207+
Add ffi_call_plan_size to report the total memory a reusable call
208+
plan owns, for embedders that account for the memory held by
209+
long-lived plans.
210+
Add powerpc64 ELFv2 _Complex long double support for both
211+
IBM-128 (double-double) and IEEE-128 formats (#1003, closes #1001).
212+
Fix powerpc64 big-endian ELFv2 closures returning 5-, 6-, or
213+
7-byte structs: missing return jump-table entries produced a
214+
wrong result and leaked a libffi code pointer.
215+
Fix ia64 return-value jump-table desync after the FFI_TYPE_LAST
216+
bump, which corrupted small-struct and HFA returns.
217+
Fix powerpc Darwin closure returns broken by #951 (#1002).
218+
Return small (1, 2, 4 or 8 byte) structs in registers on the i386
219+
FreeBSD and OpenBSD targets, matching the platform ABI and
220+
fixing a segfault on struct returns through ffi_call and closures.
221+
Cache the static trampoline "unsupported" result on hosts whose
222+
page size exceeds the trampoline table mapping, avoiding
223+
redundant re-initialization on every closure allocation
224+
(e.g. 64K-page aarch64).
225+
204226
3.7.1 July-10-2026
205227
Fix aarch64 ffi_call memory corruption when passing many large
206228
structs by value.

‎deps/libffi/configure‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for libffi 3.7.1.
3+
# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
44
#
55
# Report bugs to <http://github.com/libffi/libffi/issues>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='libffi'
623623
PACKAGE_TARNAME='libffi'
624-
PACKAGE_VERSION='3.7.1'
625-
PACKAGE_STRING='libffi 3.7.1'
624+
PACKAGE_VERSION='3.8.0'
625+
PACKAGE_STRING='libffi 3.8.0'
626626
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627627
PACKAGE_URL=''
628628

@@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
14171417
# Omit some internal or obsolete options to make the list less imposing.
14181418
# This message is too long to be a string in the A/UX 3.1 sh.
14191419
cat <<_ACEOF
1420-
\`configure' configures libffi 3.7.1 to adapt to many kinds of systems.
1420+
\`configure' configures libffi 3.8.0 to adapt to many kinds of systems.
14211421

14221422
Usage: $0 [OPTION]... [VAR=VALUE]...
14231423

@@ -1489,7 +1489,7 @@ fi
14891489

14901490
if test -n "$ac_init_help"; then
14911491
case $ac_init_help in
1492-
short | recursive ) echo "Configuration of libffi 3.7.1:";;
1492+
short | recursive ) echo "Configuration of libffi 3.8.0:";;
14931493
esac
14941494
cat <<\_ACEOF
14951495

@@ -1628,7 +1628,7 @@ fi
16281628
test -n "$ac_init_help" && exit $ac_status
16291629
if $ac_init_version; then
16301630
cat <<\_ACEOF
1631-
libffi configure 3.7.1
1631+
libffi configure 3.8.0
16321632
generated by GNU Autoconf 2.71
16331633

16341634
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
22592259
This file contains any messages produced by compilers while
22602260
running configure, to aid debugging if configure makes a mistake.
22612261

2262-
It was created by libffi $as_me 3.7.1, which was
2262+
It was created by libffi $as_me 3.8.0, which was
22632263
generated by GNU Autoconf 2.71. Invocation command line was
22642264

22652265
$ $0$ac_configure_args_raw
@@ -3233,10 +3233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32333233
ac_config_headers="$ac_config_headers fficonfig.h"
32343234

32353235

3236-
FFI_VERSION_STRING="3.7.1"
3237-
ffi_version_major=`echo "3.7.1" | cut -d. -f1`
3238-
ffi_version_minor=`echo "3.7.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239-
ffi_version_micro=`echo "3.7.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
3236+
FFI_VERSION_STRING="3.8.0"
3237+
ffi_version_major=`echo "3.8.0" | cut -d. -f1`
3238+
ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
3239+
ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
32403240
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
32413241

32423242

@@ -3986,7 +3986,7 @@ fi
39863986

39873987
# Define the identity of the package.
39883988
PACKAGE='libffi'
3989-
VERSION='3.7.1'
3989+
VERSION='3.8.0'
39903990

39913991

39923992
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20661,7 +20661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2066120661
# report actual input values of CONFIG_FILES etc. instead of their
2066220662
# values after options handling.
2066320663
ac_log="
20664-
This file was extended by libffi $as_me 3.7.1, which was
20664+
This file was extended by libffi $as_me 3.8.0, which was
2066520665
generated by GNU Autoconf 2.71. Invocation command line was
2066620666

2066720667
CONFIG_FILES = $CONFIG_FILES
@@ -20729,7 +20729,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2072920729
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2073020730
ac_cs_config='$ac_cs_config_escaped'
2073120731
ac_cs_version="\\
20732-
libffi config.status 3.7.1
20732+
libffi config.status 3.8.0
2073320733
configured by $0, generated by GNU Autoconf 2.71,
2073420734
with options \\"\$ac_cs_config\\"
2073520735

‎deps/libffi/configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
22

33
AC_PREREQ([2.68])
44

5-
AC_INIT([libffi],[3.7.1],[http://github.com/libffi/libffi/issues])
5+
AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
66
AC_CONFIG_HEADERS([fficonfig.h])
77

88
dnl Derive the version macros from AC_INIT so they cannot drift when the

‎deps/libffi/doc/libffi.info‎

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, U
301301
* Type Example:: Structure type example.
302302
* Complex:: Complex types.
303303
* Complex Type Example:: Complex type example.
304+
* Vector Types:: Vector (SIMD) types.
304305

305306

306307
File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
@@ -660,7 +661,7 @@ functions ‘ffi_prep_cif’ and ‘ffi_prep_args’ abort the program if they
660661
encounter a complex type.
661662

662663

663-
File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
664+
File: libffi.info, Node: Complex Type Example, Next: Vector Types, Prev: Complex, Up: Types
664665

665666
2.3.7 Complex Type Example
666667
--------------------------
@@ -746,6 +747,92 @@ compilers that support them:
746747
The new type descriptors can then be used like one of the built-in
747748
type descriptors in the previous example.
748749

750+

751+
File: libffi.info, Node: Vector Types, Prev: Complex Type Example, Up: Types
752+
753+
2.3.8 Vector Types
754+
------------------
755+
756+
‘libffi’ can marshal vector (SIMD) types -- the values produced by GCC's
757+
‘__attribute__((vector_size (N)))’ and Clang's ‘ext_vector_type’ -- on
758+
the platforms listed in the support table below. A vector is described
759+
just like a structure, except that every element pointer refers to the
760+
_same_ fundamental scalar type and the number of elements is the number
761+
of vector lanes.
762+
763+
-- Data type: ffi_type
764+
‘size_t size’
765+
This must be set to ‘0’. ‘libffi’ computes the storage size
766+
(see below) from the element type and lane count.
767+
768+
‘unsigned short alignment’
769+
This must be set to ‘0’. ‘libffi’ computes the alignment.
770+
771+
‘unsigned short type’
772+
For a vector type, this must be set to ‘FFI_TYPE_VECTOR’.
773+
774+
‘ffi_type **elements’
775+
This is a ‘NULL’-terminated array of pointers to ‘ffi_type’
776+
objects. Every entry must point to the same scalar element
777+
type, and the number of entries is the vector's lane count N
778+
(N >= 1). The element type must be one of ‘ffi_type_float’,
779+
‘ffi_type_double’, or a fixed-width integer (‘ffi_type_uint8’
780+
through ‘ffi_type_sint64’); ‘long double’ and aggregate
781+
element types are not permitted.
782+
783+
Computed layout
784+
...............
785+
786+
Because the caller leaves ‘size’ and ‘alignment’ at ‘0’, ‘libffi’
787+
derives them so that applications need not encode compiler- or
788+
platform-specific rules:
789+
790+
• ‘size’ is lane\_size \times N rounded _up_ to the next power of
791+
two. This matches Clang's ‘ext_vector_type’ storage -- for example
792+
a three-lane ‘float’ vector occupies 16 bytes and a three-lane
793+
‘double’ vector occupies 32 bytes. GCC's ‘vector_size’ already
794+
requires power-of-two byte totals, so the rule is identical there.
795+
796+
• ‘alignment’ is ‘min(size, 16)’.
797+
798+
If the element list is heterogeneous, empty, or uses a disallowed
799+
element type, ‘ffi_prep_cif’ returns ‘FFI_BAD_TYPEDEF’.
800+
801+
psABI framing
802+
.............
803+
804+
At the call boundary the platform's processor-specific ABI (AAPCS64 on
805+
AArch64, the System V x86-64 psABI on x86-64) decides how a vector is
806+
passed and returned, independently of which compiler produced it. The
807+
historical divergence between GCC's ‘vector_size’ and Clang's
808+
‘ext_vector_type’ concerns only in-memory _layout_ (notably the padding
809+
of odd-lane vectors such as ‘float3’); the power-of-two size rule above
810+
pins that layout down, so a value marshalled by ‘libffi’ matches what a
811+
natively compiled caller or callee expects.
812+
813+
Per-port support
814+
................
815+
816+
Port Vector support
817+
--------------------------------------------------------------------------
818+
AArch64 (AAPCS64) 8- and 16-byte vectors in a single V/Q register;
819+
homogeneous vector aggregates (structs of up to
820+
four identical 8- or 16-byte vectors) in
821+
consecutive V/Q registers. A bare vector larger
822+
than 16 bytes (for example a 32-byte ‘double4’)
823+
has no short-vector register class and is passed
824+
and returned in memory, exactly as AAPCS64 and
825+
current compilers do.
826+
x86-64 (System V 8- and 16-byte vectors in an SSE register (‘%xmm0’
827+
psABI) for returns). A bare vector larger than 16 bytes
828+
needs ‘%ymm’/‘%zmm’ register handling that this
829+
port does not yet implement, so ‘ffi_prep_cif’
830+
returns ‘FFI_BAD_TYPEDEF’ for it.
831+
Other ports Not supported: ‘ffi_prep_cif’ returns
832+
‘FFI_BAD_TYPEDEF’ for any signature that mentions
833+
a vector type, including one nested inside a
834+
struct.
835+
749836

750837
File: libffi.info, Node: Multiple ABIs, Next: Reusable Call Plans, Prev: Types, Up: Using libffi
751838

@@ -795,6 +882,14 @@ prepared ‘ffi_cif’.
795882
is harmless. The ‘ffi_cif’ the plan was built from is not
796883
affected.
797884

885+
-- Function: size_t ffi_call_plan_size (ffi_call_plan *PLAN)
886+
Returns the total number of bytes ‘libffi’ allocated for PLAN,
887+
including any internal argument-placement data it owns. Returns
888+
zero when PLAN is ‘NULL’. The result does not include the
889+
‘ffi_cif’, which the caller owns. This is intended for embedders
890+
that account for the memory held by long-lived plans and would
891+
otherwise have to guess at the size of an opaque type.
892+
798893

799894
File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Reusable Call Plans, Up: Using libffi
800895

@@ -1056,6 +1151,7 @@ Index
10561151
* ffi_call_plan_alloc: Reusable Call Plans. (line 12)
10571152
* ffi_call_plan_free: Reusable Call Plans. (line 32)
10581153
* ffi_call_plan_invoke: Reusable Call Plans. (line 22)
1154+
* ffi_call_plan_size: Reusable Call Plans. (line 37)
10591155
* ffi_closure_alloc: The Closure API. (line 19)
10601156
* ffi_closure_free: The Closure API. (line 26)
10611157
* FFI_CLOSURES: The Closure API. (line 13)
@@ -1075,6 +1171,8 @@ Index
10751171
* ffi_type <1>: Structures. (line 10)
10761172
* ffi_type <2>: Complex. (line 15)
10771173
* ffi_type <3>: Complex. (line 15)
1174+
* ffi_type <4>: Vector Types. (line 13)
1175+
* ffi_type <5>: Vector Types. (line 13)
10781176
* ffi_type_complex_double: Primitive Types. (line 82)
10791177
* ffi_type_complex_float: Primitive Types. (line 79)
10801178
* ffi_type_complex_longdouble: Primitive Types. (line 85)
@@ -1101,6 +1199,7 @@ Index
11011199
* ffi_type_void: Primitive Types. (line 10)
11021200
* Foreign Function Interface: Introduction. (line 31)
11031201
* size_t: The Basics. (line 125)
1202+
* size_t <1>: Reusable Call Plans. (line 37)
11041203
* unsigned int: The Basics. (line 122)
11051204
* unsigned long: The Basics. (line 117)
11061205
* void: The Basics. (line 72)
@@ -1118,21 +1217,22 @@ Node: Using libffi4569
11181217
Node: The Basics5172
11191218
Node: Simple Example11346
11201219
Node: Types12403
1121-
Node: Primitive Types12914
1122-
Node: Structures15231
1123-
Node: Size and Alignment16342
1124-
Node: Arrays Unions Enums18613
1125-
Node: Type Example21590
1126-
Node: Complex22896
1127-
Node: Complex Type Example24410
1128-
Node: Multiple ABIs27462
1129-
Node: Reusable Call Plans27849
1130-
Node: The Closure API29566
1131-
Node: Closure Example33908
1132-
Node: Thread Safety35552
1133-
Node: Memory Usage36385
1134-
Node: Missing Features37660
1135-
Node: Index38037
1220+
Node: Primitive Types12967
1221+
Node: Structures15284
1222+
Node: Size and Alignment16395
1223+
Node: Arrays Unions Enums18666
1224+
Node: Type Example21643
1225+
Node: Complex22949
1226+
Node: Complex Type Example24463
1227+
Node: Vector Types27536
1228+
Node: Multiple ABIs31575
1229+
Node: Reusable Call Plans31962
1230+
Node: The Closure API34155
1231+
Node: Closure Example38497
1232+
Node: Thread Safety40141
1233+
Node: Memory Usage40974
1234+
Node: Missing Features42249
1235+
Node: Index42626
11361236

11371237
End Tag Table
11381238

‎deps/libffi/doc/libffi.pdf‎

32 KB
Binary file not shown.

0 commit comments

Comments
 (0)