<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libffi.git/src, branch github-actions</title>
<subtitle>github.com: atgreen/libffi.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/'/>
<entry>
<title>2021-06-15  Jakub Jelinek  &lt;jakub@redhat.com&gt;</title>
<updated>2021-06-15T19:24:24+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@redhat.com</email>
</author>
<published>2021-06-15T19:19:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=5651bea284ad0822eafe768e3443c2f4d7da2c8f'/>
<id>5651bea284ad0822eafe768e3443c2f4d7da2c8f</id>
<content type='text'>
        * src/x86/ffi64.c (classify_argument): For FFI_TYPE_STRUCT set words
        to number of words needed for type-&gt;size + byte_offset bytes rather
        than just type-&gt;size bytes.  Compute pos before the loop and check
        total size of the structure.
        * testsuite/libffi.call/nested_struct12.c: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        * src/x86/ffi64.c (classify_argument): For FFI_TYPE_STRUCT set words
        to number of words needed for type-&gt;size + byte_offset bytes rather
        than just type-&gt;size bytes.  Compute pos before the loop and check
        total size of the structure.
        * testsuite/libffi.call/nested_struct12.c: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix build on OpenBSD/mips64 (#638)</title>
<updated>2021-06-10T18:41:02+00:00</updated>
<author>
<name>vhankala</name>
<email>81743325+vhankala@users.noreply.github.com</email>
</author>
<published>2021-06-10T18:41:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=ff059dd96af6ba4daf7bc9ddf22d1d2dbf6a177b'/>
<id>ff059dd96af6ba4daf7bc9ddf22d1d2dbf6a177b</id>
<content type='text'>
The build fails on OpenBSD/mips64 because clang 11's integrated
assembler expects read-only .eh_frame:

../src/mips/n32.S:585:9: error: changed section flags for .eh_frame, expected: 0x2
        .section .eh_frame,"aw",@progbits
        ^

Use EH_FRAME_FLAGS to get matching flags for the section.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The build fails on OpenBSD/mips64 because clang 11's integrated
assembler expects read-only .eh_frame:

../src/mips/n32.S:585:9: error: changed section flags for .eh_frame, expected: 0x2
        .section .eh_frame,"aw",@progbits
        ^

Use EH_FRAME_FLAGS to get matching flags for the section.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix building for arm windows with mingw toolchains (#631)</title>
<updated>2021-04-07T02:42:10+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2021-04-07T02:42:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=dd5bd03075149d7cf8441875c1a344e8beb57dde'/>
<id>dd5bd03075149d7cf8441875c1a344e8beb57dde</id>
<content type='text'>
* arm: Check _WIN32 instead of _M_ARM or _MSC_VER for detecting windows

This matches what was done for ARM64 in
c06468fa6674d3783a0edb1d0fae9afc8bc28513.

* arm: Only use armasm source when building with MSVC

When building for windows/arm with clang, the normal gas style .S
source works fine (if fixed up to support thumb and other windows
specifics).

This matches what was done for ARM64 in
c06468fa6674d3783a0edb1d0fae9afc8bc28513.

* arm: Fix sysv.S to work in thumb mode

Align cases in jump tables (adding nop padding to make sure each
case starts where expected).

Rewrite instructions that add directly to the pc register.

For ffi_closure_ret, factor out a call_epilogue subroutine that
restores both sp and pc from the stack; the thumb version of ldm
can't load into the sp register. To avoid excessive ifdeffing, keep
using call_epilogue in arm mode, but keep the shorter "ldm sp, {sp, pc}"
epilogue in that case.

* arm: Add win32 version of trampoline to sysv.S

This matches the version of it in sysv_msvc_arm32.S. The calling
C code expects a specific form of the trampoline on windows; make
sure these work the same on windows regardless of the form of
assembly used.

* arm: Avoid optimizing out clearing the thumb bit of ffi_arm_trampoline

We clear the thumb bit of ffi_arm_trampoline with a bitmask before
memcpying its instructions into closure-&gt;tramp.

If the bit isn't cleared, the memcpy of the trampoline function
copies the wrong instructions.

If the ffi_arm_trampoline symbol is declared as an array of int,
the compiler can assume that it is aligned to a 4 byte boundary
and the bitmask operation is a no-op, and optimize it out.

See https://godbolt.org/z/dE3jE1WTz; both Clang and GCC optimize
out the bitmask as it is, while MSVC doesn't. By declaring the
trampoline as an array of unsigned char, the bitmask works as
intended.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* arm: Check _WIN32 instead of _M_ARM or _MSC_VER for detecting windows

This matches what was done for ARM64 in
c06468fa6674d3783a0edb1d0fae9afc8bc28513.

* arm: Only use armasm source when building with MSVC

When building for windows/arm with clang, the normal gas style .S
source works fine (if fixed up to support thumb and other windows
specifics).

This matches what was done for ARM64 in
c06468fa6674d3783a0edb1d0fae9afc8bc28513.

* arm: Fix sysv.S to work in thumb mode

Align cases in jump tables (adding nop padding to make sure each
case starts where expected).

Rewrite instructions that add directly to the pc register.

For ffi_closure_ret, factor out a call_epilogue subroutine that
restores both sp and pc from the stack; the thumb version of ldm
can't load into the sp register. To avoid excessive ifdeffing, keep
using call_epilogue in arm mode, but keep the shorter "ldm sp, {sp, pc}"
epilogue in that case.

* arm: Add win32 version of trampoline to sysv.S

This matches the version of it in sysv_msvc_arm32.S. The calling
C code expects a specific form of the trampoline on windows; make
sure these work the same on windows regardless of the form of
assembly used.

* arm: Avoid optimizing out clearing the thumb bit of ffi_arm_trampoline

We clear the thumb bit of ffi_arm_trampoline with a bitmask before
memcpying its instructions into closure-&gt;tramp.

If the bit isn't cleared, the memcpy of the trampoline function
copies the wrong instructions.

If the ffi_arm_trampoline symbol is declared as an array of int,
the compiler can assume that it is aligned to a 4 byte boundary
and the bitmask operation is a no-op, and optimize it out.

See https://godbolt.org/z/dE3jE1WTz; both Clang and GCC optimize
out the bitmask as it is, while MSVC doesn't. By declaring the
trampoline as an array of unsigned char, the bitmask works as
intended.</pre>
</div>
</content>
</entry>
<entry>
<title>arm64e: Pull in pointer authentication code from Apple's arm64e libffi port (#565)</title>
<updated>2021-03-24T18:38:36+00:00</updated>
<author>
<name>Jeremy Huddleston Sequoia</name>
<email>jeremyhu@users.noreply.github.com</email>
</author>
<published>2021-03-24T18:38:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=eafab2356e8dcf5f01d2bcfa311cafba3b395a7e'/>
<id>eafab2356e8dcf5f01d2bcfa311cafba3b395a7e</id>
<content type='text'>
NOTES: This changes the ptrauth support from #548 to match what Apple is
       shipping in its libffi-27 tag.

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NOTES: This changes the ptrauth support from #548 to match what Apple is
       shipping in its libffi-27 tag.

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>x86: Fix thiscall and fastcall stack cleanup behavior (#611)</title>
<updated>2021-03-24T11:16:12+00:00</updated>
<author>
<name>Ole André Vadla Ravnås</name>
<email>oleavr@gmail.com</email>
</author>
<published>2021-03-24T11:16:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=1aeb26714ec30649f5d9de5b4884a4ac46f5f474'/>
<id>1aeb26714ec30649f5d9de5b4884a4ac46f5f474</id>
<content type='text'>
These are meant to use callee clean-up.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are meant to use callee clean-up.</pre>
</div>
</content>
</entry>
<entry>
<title>x86: Fix MSVC runtime checks interop (#612)</title>
<updated>2021-03-24T11:04:51+00:00</updated>
<author>
<name>Ole André Vadla Ravnås</name>
<email>oleavr@gmail.com</email>
</author>
<published>2021-03-24T11:04:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=f88add14e40de398706c732e578620e8106062c7'/>
<id>f88add14e40de398706c732e578620e8106062c7</id>
<content type='text'>
MSVC can add runtime code that checks if a stack frame is mismanaged,
however our custom assembly deliberately accesses and modifies the parent
stack frame.  Fortunately we can disable that specific check for the
function call so do that.

Co-authored-by: Matthew Waters &lt;matthew@centricular.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MSVC can add runtime code that checks if a stack frame is mismanaged,
however our custom assembly deliberately accesses and modifies the parent
stack frame.  Fortunately we can disable that specific check for the
function call so do that.

Co-authored-by: Matthew Waters &lt;matthew@centricular.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Search $LIBFFI_TMPDIR also (#605)</title>
<updated>2021-03-23T23:03:45+00:00</updated>
<author>
<name>DJ Delorie</name>
<email>dj@delorie.com</email>
</author>
<published>2021-03-23T23:03:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=70ea259c603e0f84eda766be29d4259f1e8fe5b7'/>
<id>70ea259c603e0f84eda766be29d4259f1e8fe5b7</id>
<content type='text'>
Most temp file directories need to be hardened against execution, but
libffi needs execute privileges.  Add a libffi-specific temp directory
that can be set up by sysadmins as needed with suitable permissions.
This both ensures that libffi will have a valid temp directory to use
as well as preventing attempts to access other directories.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most temp file directories need to be hardened against execution, but
libffi needs execute privileges.  Add a libffi-specific temp directory
that can be set up by sysadmins as needed with suitable permissions.
This both ensures that libffi will have a valid temp directory to use
as well as preventing attempts to access other directories.</pre>
</div>
</content>
</entry>
<entry>
<title>aarch64: Fix closures for win64 (#606)</title>
<updated>2021-03-23T22:54:00+00:00</updated>
<author>
<name>AndreRH</name>
<email>andre.hentschel@ok.de</email>
</author>
<published>2021-03-23T22:54:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=f58e5ee63263657a7e8f2892d27c012a16facc1a'/>
<id>f58e5ee63263657a7e8f2892d27c012a16facc1a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Bug #680.  Don't accept floats or small ints as var args. (#628)</title>
<updated>2021-03-23T15:31:08+00:00</updated>
<author>
<name>Anthony Green</name>
<email>green@moxielogic.com</email>
</author>
<published>2021-03-23T15:31:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=205cf01b57972fdc8c090fc79192b464dc43fc0d'/>
<id>205cf01b57972fdc8c090fc79192b464dc43fc0d</id>
<content type='text'>
* Bug #680.  Don't accept floats or small ints as var args.

* Bug #680.  Don't accept floats or small ints as var args.

* Bug #680.  Don't accept floats or small ints as var args.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Bug #680.  Don't accept floats or small ints as var args.

* Bug #680.  Don't accept floats or small ints as var args.

* Bug #680.  Don't accept floats or small ints as var args.</pre>
</div>
</content>
</entry>
<entry>
<title>Add some missing #if conditionals from Apple's code drop (#620)</title>
<updated>2021-03-20T13:06:28+00:00</updated>
<author>
<name>Jeremy Huddleston Sequoia</name>
<email>jeremyhu@users.noreply.github.com</email>
</author>
<published>2021-03-20T13:06:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libffi.git/commit/?id=d271dbe0a8b230e566fa3385babdc9cc0ca214ea'/>
<id>d271dbe0a8b230e566fa3385babdc9cc0ca214ea</id>
<content type='text'>
* arm/aarch64: Add FFI_CLOSURES conditionals where appropriate

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;

* aarch64: Don't emit the do_closure label when building without FFI_GO_CLOSURES

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* arm/aarch64: Add FFI_CLOSURES conditionals where appropriate

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;

* aarch64: Don't emit the do_closure label when building without FFI_GO_CLOSURES

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;</pre>
</div>
</content>
</entry>
</feed>
