[前][次][番号順一覧][スレッド一覧]

ruby-changes:60335

From: Jeremy <ko1@a...>
Date: Mon, 9 Mar 2020 09:54:31 +0900 (JST)
Subject: [ruby-changes:60335] 040cfc89b9 (master): Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSD

https://git.ruby-lang.org/ruby.git/commit/?id=040cfc89b9

From 040cfc89b9a110cd0fb2abdcd35e8215b4a71f60 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Sun, 8 Mar 2020 17:47:48 -0700
Subject: Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSD

On OpenBSD, USE_FFI_CLOSURE_ALLOC was always set to 0 previously. In
633a1f15d8228236094ddee12e4e169d655ec49e, the code was modified in a
way that it ended up being set to 1 on OpenBSD.  However, that results
in SIGABRT when running make test-all, inside ffi_closure_free.
Setting USE_FFI_CLOSURE_ALLOC back to 0 fixes the issue.

diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index 2044c83..40cee55 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -13,6 +13,10 @@ typedef struct { https://github.com/ruby/ruby/blob/trunk/ext/fiddle/closure.c#L13
     ffi_type **argv;
 } fiddle_closure;
 
+#if defined(__OpenBSD__)
+# define USE_FFI_CLOSURE_ALLOC 0
+#endif
+
 #if defined(USE_FFI_CLOSURE_ALLOC)
 #elif !defined(HAVE_FFI_CLOSURE_ALLOC)
 # define USE_FFI_CLOSURE_ALLOC 0
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]