ruby-changes:61232
From: Yusuke <ko1@a...>
Date: Wed, 13 May 2020 08:43:05 +0900 (JST)
Subject: [ruby-changes:61232] 9cfa811b0f (master): Do not try ffi_closure_alloc if libffi is <= 3.1
https://git.ruby-lang.org/ruby.git/commit/?id=9cfa811b0f From 9cfa811b0f209d714f89fe0de6778c71f77556c7 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Wed, 13 May 2020 08:39:50 +0900 Subject: Do not try ffi_closure_alloc if libffi is <= 3.1 Maybe due to e1855100e46040e73630b378974c17764e0cccee, CentOS, RHEL, and Fedora CIs have started failing with SEGV. Try to avoid ffi_closure_alloc on those environments. https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200512T183004Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora32/ruby-master/log/20200512T183004Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20200512T183003Z.fail.html.gz diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb index 120c4ce..35e5a31 100644 --- a/ext/fiddle/extconf.rb +++ b/ext/fiddle/extconf.rb @@ -122,6 +122,7 @@ end https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L122 case when $mswin, $mingw, (ver && (ver <=> [3, 2]) >= 0) $defs << "-DUSE_FFI_CLOSURE_ALLOC=1" +when (ver && (ver <=> [3, 1]) <= 0) else have_func('ffi_closure_alloc', ffi_header) end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/