diff options
author | Mihail Konev <k.mvc@ya.ru> | 2016-12-12 23:11:28 +0500 |
---|---|---|
committer | Mihail Konev <k.mvc@ya.ru> | 2017-07-13 17:01:19 +0500 |
commit | 9f257af19e6088c2986f85dea17455e52a2be405 (patch) | |
tree | 1510a9f8c653a21bc99713a4ca6185d88365de5a /ext/ffi_c/FunctionInfo.c | |
parent | a78689d75ba9ea1e14c8dac75e27b60f8fd876e5 (diff) | |
download | ffi-9f257af19e6088c2986f85dea17455e52a2be405.tar.gz |
Do closures via libffi
This removes ClosurePool. It has been switching pages protection between
writable and executable, which was making it incompatible with PaX
MPROTECT.
libffi instead leaves its closures (closure trampolines) non-executable,
relying on PaX to recognize and emulate them, which allows it to work
even under such circumstances.
Remove CUSTOM_TRAMPOLINE and USE_RAW to avoid ifdef hassle.
Diffstat (limited to 'ext/ffi_c/FunctionInfo.c')
-rw-r--r-- | ext/ffi_c/FunctionInfo.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/ffi_c/FunctionInfo.c b/ext/ffi_c/FunctionInfo.c index 8085c87..a2ed83f 100644 --- a/ext/ffi_c/FunctionInfo.c +++ b/ext/ffi_c/FunctionInfo.c @@ -72,7 +72,6 @@ fntype_allocate(VALUE klass) fnInfo->rbParameterTypes = Qnil; fnInfo->rbEnums = Qnil; fnInfo->invoke = rbffi_CallFunction; - fnInfo->closurePool = NULL; return obj; } @@ -95,9 +94,6 @@ fntype_free(FunctionType* fnInfo) xfree(fnInfo->ffiParameterTypes); xfree(fnInfo->nativeParameterTypes); xfree(fnInfo->callbackParameters); - if (fnInfo->closurePool != NULL) { - rbffi_ClosurePool_Free(fnInfo->closurePool); - } xfree(fnInfo); } |