From: nagachika00@... Date: 2016-07-30T03:21:55+00:00 Subject: [ruby-dev:49741] [Ruby trunk Bug#12531] Segmentation fault occurred when execute curry with block Issue #12531 has been updated by Tomoyuki Chikanaga. Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE ruby_2_3 r55778 merged revision(s) 54909,55531. ---------------------------------------- Bug #12531: Segmentation fault occurred when execute curry with block https://bugs.ruby-lang.org/issues/12531#change-59840 * Author: Daisuke Sato * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.4.0dev (2016-06-28 trunk 55527) [x86_64-darwin15] * Backport: 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE ---------------------------------------- When I execute code below: ~~~ $ ./ruby -e '-> { true }.curry.call(&:to_s)' ~~~ I create a patch for fix and test. I hope for your help :) And logs: ~~~ [trunk][~/devel/ruby]$ ./ruby -e 'proc { true }.curry.call(&:to_s)' rbenv:2.4.0-preview1 -e:1: [BUG] Segmentation fault at 0x000000000ce12c ruby 2.4.0dev (2016-06-28 trunk 55527) [x86_64-darwin15] -- Crash Report log information -------------------------------------------- See Crash Report log file under the one of following: * ~/Library/Logs/CrashReporter * /Library/Logs/CrashReporter * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports for more details. Don't forget to include the above Crash Report log file in bug reports. -- Control frame information ----------------------------------------------- c:0003 p:---- s:0006 e:000005 IFUNC c:0002 p:0016 s:0004 E:001160 EVAL -e:1 [FINISH] c:0001 p:0000 s:0002 E:001380 (none) [FINISH] -- Ruby level backtrace information ---------------------------------------- -e:1:in `
' -- Machine register context ------------------------------------------------ rax: 0x00000000000ce10c rbx: 0x000000010d292020 rcx: 0x00007fb4215a9190 rdx: 0x00007fb4228be5e8 rdi: 0x00000000000ce10c rsi: 0x0000000000000000 rbp: 0x00007fff52fd1b40 rsp: 0x00007fff52fd1b40 r8: 0x00007fb4228be5d8 r9: 0x0000000000000000 r10: 0x00007fb4214071b0 r11: 0x000000010d292000 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000 rip: 0x000000010cd7a027 rfl: 0x0000000000010202 -- C level backtrace information ------------------------------------------- 0 ruby 0x000000010ce9eaa9 rb_print_backtrace + 25 1 ruby 0x000000010ce9ebbd rb_vm_bugreport + 141 2 ruby 0x000000010ccaea84 rb_bug_context + 452 3 ruby 0x000000010cdec6fb sigsegv + 91 4 libsystem_platform.dylib 0x00007fff8b53c52a _sigtramp + 26 5 ruby 0x000000010cd7a027 passed_block + 23 6 ??? 0x00007fff52fd1bc0 0x0 + 140734585707456 -- Other runtime information ----------------------------------------------- * Loaded script: -e * Loaded features: 0 enumerator.so 1 thread.rb 2 rational.so 3 complex.so 4 /usr/local/lib/ruby/2.4.0/x86_64-darwin15/enc/encdb.bundle 5 /usr/local/lib/ruby/2.4.0/x86_64-darwin15/enc/trans/transdb.bundle 6 /usr/local/lib/ruby/2.4.0/unicode_normalize.rb 7 /usr/local/lib/ruby/2.4.0/x86_64-darwin15/rbconfig.rb 8 /usr/local/lib/ruby/2.4.0/rubygems/compatibility.rb 9 /usr/local/lib/ruby/2.4.0/rubygems/defaults.rb 10 /usr/local/lib/ruby/2.4.0/rubygems/deprecate.rb 11 /usr/local/lib/ruby/2.4.0/rubygems/errors.rb 12 /usr/local/lib/ruby/2.4.0/rubygems/version.rb 13 /usr/local/lib/ruby/2.4.0/rubygems/requirement.rb 14 /usr/local/lib/ruby/2.4.0/rubygems/platform.rb 15 /usr/local/lib/ruby/2.4.0/rubygems/basic_specification.rb 16 /usr/local/lib/ruby/2.4.0/rubygems/stub_specification.rb 17 /usr/local/lib/ruby/2.4.0/rubygems/util/list.rb 18 /usr/local/lib/ruby/2.4.0/x86_64-darwin15/stringio.bundle 19 /usr/local/lib/ruby/2.4.0/rubygems/specification.rb 20 /usr/local/lib/ruby/2.4.0/rubygems/exceptions.rb 21 /usr/local/lib/ruby/2.4.0/rubygems/dependency.rb 22 /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_gem.rb 23 /usr/local/lib/ruby/2.4.0/monitor.rb 24 /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb 25 /usr/local/lib/ruby/2.4.0/rubygems.rb 26 /usr/local/lib/ruby/2.4.0/rubygems/path_support.rb [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html [1] 66954 abort ./ruby -e 'proc { true }.curry.call(&:to_s)' ~~~ ---Files-------------------------------- DiagnosticReports.crash (12.7 KB) fix_curry_with_block.patch (1.18 KB) -- https://bugs.ruby-lang.org/