src/closures.c


Log

Author Commit Date CI Message
Ryan C. Underwood d4640608 2018-03-18T07:00:42 Fully allocate file backing writable maps (#389) When ftruncate() is used on a filesystem supporting sparse files, space in the file is not actually allocated. Then, when the file is mmap'd and libffi writes to the mapping, SIGBUS is thrown to the calling application. Instead, always fully allocate the file that will back writable maps.
Anthony Green 4fdbb057 2017-11-03T07:05:31 Merge pull request #320 from 0-wiz-0/master Support NetBSD with mprotect.
Jean-Luc Jumpertz 181fc4cc 2017-10-23T15:02:29 Merge branch 'master' based on ksjogo/libffi Added a tvOS target in Xcode project. Misc Xcode project cleanup. Fix macOS build target in Xcode project. # Conflicts: # src/aarch64/ffi.c # src/x86/ffi64.c
Joerg Sonnenberger 2bfcd299 2017-10-02T15:34:03 Support NetBSD with mprotect. Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Anthony Green 93d8e7dd 2017-09-27T21:51:34 Fix #265
Jean-Luc Jumpertz a78da739 2017-09-04T15:55:34 Fix macOS build target in Xcode project. - Add missing files for desktop platforms in generate-darwin-source-and-headers.py, and in the Xcode project. - Add a static library target for macOS. - Fix "implicit conversion loses integer precision" warnings for iOS mad macOS targets.
Ole André Vadla Ravnås 57d8ff04 2017-03-15T01:43:11 Simplify iOS trampoline table allocation By using VM_FLAGS_OVERWRITE there is no need for speculatively allocating on a page we just deallocated. This approach eliminates the race-condition and gets rid of the retry logic.
Ole André Vadla Ravnås 5e4fcdcc 2017-03-15T01:43:11 Simplify iOS trampoline table allocation By using VM_FLAGS_OVERWRITE there is no need for speculatively allocating on a page we just deallocated. This approach eliminates the race-condition and gets rid of the retry logic.
Ole André Vadla Ravnås d42ce7b9 2017-03-15T01:23:40 Fix error path so mutex is unlocked before returning In the unusual case where ffi_trampoline_table_alloc() fails.
Berker Peksag 74b3f520 2016-05-19T18:05:36 Remove unused FFI_CLOSURE_TEST It was here since the first commit c6dddbd (warning: huge diff) and it wasn't defined by the configure script. It was probably used manually during development.
Kylie McClain e169ba2b 2016-04-29T21:04:07 Fix usage on musl libc A gcc compiled on musl does not define __gnu_linux__, it defines __linux__. Only on glibc does __gnu_linux__ get defined, but both define __linux__, so we should check for that instead. With this patch, libffi works perfectly, and passes its testsuite entirely on musl libc systems.
Russell Keith-Magee bc4fc07a 2015-12-21T00:37:06 Fixed #181 -- Corrected problems with ARMv7 build under iOS. Based on a patch from @fealebenpae, with input from @SolaWing and @rth7680, and testing from @superdump.
Anthony Green 1cee07be 2014-06-12T06:30:59 Remove compiler warning
Mickaël Salaün c1166d4f 2014-05-12T19:44:08 closures: Check for mkostemp(3)
Mickaël Salaün 8daeed95 2014-05-11T22:54:58 closures: Create temporary file with O_TMPFILE and O_CLOEXEC when available The open_temp_exec_file_dir function can create a temporary file without file system accessible link. If the O_TMPFILE flag is not defined (old Linux kernel or libc) the behavior is unchanged. The open_temp_exec_file_name function now need a new argument "flags" (like O_CLOEXEC) used for temporary file creation. The O_TMPFILE flag allow temporary file creation without race condition. This feature/fix prevent another process to access the (future) executable file from the file system. The O_CLOEXEC flag automatically close the temporary file for any execve. This avoid transmitting (executable) file descriptor to a child process.
Magnus Granberg 52b34570 2014-05-11T09:55:28 Check /proc/self/status for PaX status.
Anthony Green 11d7aa9d 2014-02-28T01:06:48 Merge pull request #46 from makotokato/android-clang Fix build failure when using clang for Android
Anthony Green 67fbef3b 2014-02-28T01:06:48 Merge pull request #46 from makotokato/android-clang Fix build failure when using clang for Android
Zachary Waldowski 9da28b44 2013-12-30T16:23:21 Darwin/x86_64: Fix 64-bit type shortening warnings
Anthony Green 3dc3f32c 2013-12-05T16:23:25 Undo iOS ARM64 changes.
Zachary Waldowski 0612081e 2013-11-30T03:03:00 Darwin: Misc size_t warnings
Anthony Green 128cd1d2 2013-10-08T06:45:51 Fix spelling errors
Makoto Kato 3b44d411 2013-07-10T15:34:53 Fix build failure when using clang for Android clang for Android generates __gnu_linux__ define, but gcc for Android doesn't. So we should add check it for Android
Anthony Green 12b1886d 2013-03-17T18:32:12 cygwin fix & updates for 3.0.13
Anthony Green d08124be 2013-03-17T18:32:12 cygwin fix & updates for 3.0.13
Anthony Green e944b8c7 2012-10-30T14:06:09 Add PaX work-around
Anthony Green 6a6e7f86 2011-11-12T16:20:42 Fix kfreebsd
Anthony Green c411f140 2011-11-12T07:32:36 Fix ax_enable_builddir macro on BSD systems
Anthony Green 049d8386 2011-08-22T14:50:10 Many new patches
Anthony Green 747d6c32 2011-02-09T14:56:23 Add Interix support
Anthony Green 0cad4386 2011-02-09T06:11:46 Add ChangeLog entry. Fix copyright headers.
Anthony Green 1106229a 2011-02-08T19:20:09 Add iOS support
Anthony Green 0e584399 2011-02-08T07:52:40 Refresh from GCC
Anthony Green 2db72615 2010-11-21T10:50:56 Rebase
Landon Fuller 83038cf2 2010-09-19T14:36:45 Implement FFI_EXEC_TRAMPOLINE_TABLE allocator for iOS/ARM. This provides working closure support on iOS/ARM devices where PROT_WRITE|PROT_EXEC is not permitted. The code passes basic smoke tests, but requires further review.
Landon Fuller 9e119644 2010-09-19T10:43:06 Add a hard-coded FFI_EXEC_TRAMPOLINE_TABLE arm implementation. This implements support for re-mapping a shared table of executable trampolines directly in front of a writable configuration page, working around PROT_WRITE restrictions for sandboxed applications on Apple's iOS. This implementation is for testing purposes; a proper allocator is still necessary, and ARM-specific code needs to be moved out of src/closures.c.
Anthony Green eaf444ea 2010-07-10T08:59:09 Fix selinux test
Anthony Green f2c2a4fc 2010-04-13T10:19:28 Remove warnings and add OS/2 support
Anthony Green c3042afa 2010-01-01T08:08:02 Reset quilt patches post 3.0.9 merge with GCC
Anthony Green 0cfe60e9 2009-12-29T10:06:04 3.0.9rc12
Anthony Green 39c8792e 2009-12-25T21:52:28 3.0.9rc7
Anthony Green 115ab36f 2009-12-24T00:22:00 Update missing changes for 3.0.9r4.
Anthony Green e4a91de7 2009-10-05T00:16:17 From Abdulaziz Ghuloum. Adds special case for Snow Leopard.
Anthony Green c6dddbd0 2009-10-04T08:11:33 Initial commit