Project

General

Profile

Bug #12462

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

Hi. 
 Is this bug? 

 I execute it. 

 ~~~ 
 ruby -ve "def x; Proc.new { return 1 }.tap(&:call); end; p x" 
 ~~~ 

 Result is this. 

 ~~~ 
 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] 
 -e:1: [BUG] Segmentation fault at 0x000000000d011c 
 (snip) ruby 2.3.1p112 (2016-04-26 revision 54768) [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:0006 p:0007 s:0015 e:000014 BLOCK    -e:1 [FINISH] 
 c:0005 p:---- s:0013 e:000012 IFUNC    :call 
 c:0004 p:---- s:0011 e:000010 CFUNC    :tap 
 c:0003 p:0021 s:0008 E:000b10 METHOD -e:1 
 c:0002 p:0017 s:0005 E:000aa0 EVAL     -e:1 [FINISH] 
 c:0001 p:0000 s:0002 E:001950 (none) [FINISH] 

 -- Ruby level backtrace information ---------------------------------------- 
 -e:1:in `<main>' 
 -e:1:in `x' 
 -e:1:in `tap' 
 -e:1:in `block in x' 

 -- Machine register context ------------------------------------------------ 
  rax: 0x000000010ff7c000 rbx: 0x000000010fe7c060 rcx: 0x00007fec5bde4570 
  rdx: 0x00000000000d010c rdi: 0x00007fec5bc06e20 rsi: 0x00007fec5bde4570 
  rbp: 0x00007fff502e2700 rsp: 0x00007fff502e23c0    r8: 0x0000000000000000 
   r9: 0x0000000000000001 r10: 0x000000010fe7c070 r11: 0x0000000000000000 
  r12: 0x00007fec5bd9b9a8 r13: 0x000000010ff7bec0 r14: 0x00007fec5bc06e20 
  r15: 0x0000000000000003 rip: 0x000000010faa616f rfl: 0x0000000000010246 

 -- C level backtrace information ------------------------------------------- 
 0     ruby                                  0x000000010fac6b14 rb_vm_bugreport + 388 
 1     ruby                                  0x000000010f96133a rb_bug_context + 490 
 2     ruby                                  0x000000010fa34d23 sigsegv + 83 
 3     libsystem_platform.dylib              0x00007fff8cac152a _sigtramp + 26 
 4     ruby                                  0x000000010faa616f vm_exec_core + 15167 
 5     ???                                   0x0000000000000000 0x0 + 0 

 -- Other runtime information ----------------------------------------------- 

 * Loaded script: -e 

 * Loaded features: 

     0 enumerator.so 
     1 thread.rb 
     2 rational.so 
     3 complex.so 
     4 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/enc/encdb.bundle 
     5 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/enc/trans/transdb.bundle 
     6 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/unicode_normalize.rb 
     7 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb 
     8 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/compatibility.rb 
     9 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/defaults.rb 
    10 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/deprecate.rb 
    11 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/errors.rb 
    12 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/version.rb 
    13 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/requirement.rb 
    14 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/platform.rb 
    15 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/basic_specification.rb 
    16 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/stub_specification.rb 
    17 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/util/list.rb 
    18 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/stringio.bundle 
    19 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb 
    20 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/exceptions.rb 
    21 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb 
    22 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/monitor.rb 
    23 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb 
    24 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems.rb 
    25 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/path_support.rb 
    26 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb 
    27 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/version.rb 
    28 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb 
    29 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/levenshtein.rb 
    30 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/jaro_winkler.rb 
    31 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkable.rb 
    32 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/2.3.0/delegate.rb 
    33 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb 
    34 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb 
    35 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb 
    36 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/method_name_checker.rb 
    37 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/null_checker.rb 
    38 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/formatter.rb 
    39 /Users/yancya/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean.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]      57115 abort        ruby -ve "def x; Proc.new { return 1 }.tap(&:call); end; p x" 
 ~~~ 

 not working 

 * ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] 
 * ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] 
 * ruby 2.4.0dev (2016-06-06 trunk 55293) [x86_64-darwin15] 

 working 

 * ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin14.4.0] 
 * ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin15.5.0] 
 * ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin15.0] 
 * ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15] 
 * jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [darwin-x86_64] 


Back