eval.in

Paste #13339

Ruby — MRI 2.0.0, pasted 1 year ago

1
2
3
4
5
6
7
loop do
  m = "__bug"
  Object.class_eval("def #{m}; 'Hello world'*1000 end")
  method = Object.instance_method(m)
  Object.send(:remove_method, m)
  method.bind(Object.new).call
end

Program Output

/tmp/execpad-8012f584a2a6/source-8012f584a2a6:3: [BUG] rb_gc_mark(): unknown data type 0x0(0x4097bb18) non object
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]

-- Control frame information -----------------------------------------------
c:0005 p:---- s:0015 e:000014 CFUNC  :class_eval
c:0004 p:0028 s:0011 e:000010 BLOCK  /tmp/execpad-8012f584a2a6/source-8012f584a2a6:3 [FINISH]
c:0003 p:---- s:0007 e:000006 CFUNC  :loop
c:0002 p:0005 s:0004 E:0009b4 EVAL   /tmp/execpad-8012f584a2a6/source-8012f584a2a6:1 [FINISH]
c:0001 p:0000 s:0002 E:001bdc TOP    [FINISH]

/tmp/execpad-8012f584a2a6/source-8012f584a2a6:1:in `<main>'
/tmp/execpad-8012f584a2a6/source-8012f584a2a6:1:in `loop'
/tmp/execpad-8012f584a2a6/source-8012f584a2a6:3:in `block in <main>'
/tmp/execpad-8012f584a2a6/source-8012f584a2a6:3:in `class_eval'

-- C level backtrace information -------------------------------------------
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x15aad2) [0x4015aad2]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x1b2d4f) [0x401b2d4f]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_bug+0x49) [0x401b2f99]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x304bb) [0x400304bb]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x30cd8) [0x40030cd8]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x32668) [0x40032668]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_newobj_of+0x29) [0x40032909]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0xe5802) [0x400e5802]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_enc_str_new+0x2d) [0x400e5a9d]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x73604) [0x40073604]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x8beca) [0x4008beca]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x15f011) [0x4015f011]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_parser_compile_string+0xaf) [0x4007444f]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_iseq_compile_with_option+0x10d) [0x4013cd8d]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_iseq_compile_on_base+0x36) [0x4013cfe6]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x14ddf2) [0x4014ddf2]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x1581a0) [0x401581a0]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x13e08d) [0x4013e08d]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x14405a) [0x4014405a]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x1592bd) [0x401592bd]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x147fd8) [0x40147fd8]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x14d5ef) [0x4014d5ef]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x157706) [0x40157706]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_rescue2+0x169) [0x40019339]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x1410c5) [0x401410c5]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x13e09f) [0x4013e09f]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x14405a) [0x4014405a]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x1592bd) [0x401592bd]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x14847c) [0x4014847c]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x14d5ef) [0x4014d5ef]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(rb_iseq_eval_main+0x140) [0x4014d9f0]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x197fa) [0x400197fa]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(ruby_run_node+0x42) [0x4001c232]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x17c28) [0x40017c28]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x40306bd6]
/execpad/interpreters/ruby-2.0.0-p0/bin/ruby(+0x17af1) [0x40017af1]

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

* Loaded script: /tmp/execpad-8012f584a2a6/source-8012f584a2a6

* Loaded features:

    0 enumerator.so
    1 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
    2 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
    3 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/rbconfig.rb
    4 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/compatibility.rb
    5 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/defaults.rb
    6 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/deprecate.rb
    7 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/errors.rb
    8 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/version.rb
    9 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/requirement.rb
   10 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/platform.rb
   11 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/specification.rb
   12 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/exceptions.rb
   13 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
   14 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb
   15 /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems.rb

* Process memory map:

40000000-40236000 r-xp 00000000 08:01 1098711    /execpad/interpreters/ruby-2.0.0-p0/bin/ruby
40236000-40239000 r--p 00235000 08:01 1098711    /execpad/interpreters/ruby-2.0.0-p0/bin/ruby
40239000-4023a000 rw-p 00238000 08:01 1098711    /execpad/interpreters/ruby-2.0.0-p0/bin/ruby
4023a000-4024c000 rw-p 00000000 00:00 0 
4024c000-40267000 r-xp 00000000 08:01 922138     /lib/ld-2.11.1.so
40267000-40268000 r--p 0001a000 08:01 922138     /lib/ld-2.11.1.so
40268000-40269000 rw-p 0001b000 08:01 922138     /lib/ld-2.11.1.so
40269000-4026a000 r-xp 00000000 00:00 0          [vdso]
4026a000-4026c000 rw-p 00000000 00:00 0 
4026c000-4026d000 ---p 00000000 00:00 0 
4026d000-40271000 rw-p 00000000 00:00 0 
40271000-40286000 r-xp 00000000 08:01 917528     /lib/tls/i686/cmov/libpthread-2.11.1.so
40286000-40287000 r--p 00014000 08:01 917528     /lib/tls/i686/cmov/libpthread-2.11.1.so
40287000-40288000 rw-p 00015000 08:01 917528     /lib/tls/i686/cmov/libpthread-2.11.1.so
40288000-4028a000 rw-p 00000000 00:00 0 
4028a000-40291000 r-xp 00000000 08:01 917548     /lib/tls/i686/cmov/librt-2.11.1.so
40291000-40292000 r--p 00006000 08:01 917548     /lib/tls/i686/cmov/librt-2.11.1.so
40292000-40293000 rw-p 00007000 08:01 917548     /lib/tls/i686/cmov/librt-2.11.1.so
40293000-40294000 rw-p 00000000 00:00 0 
40294000-40296000 r-xp 00000000 08:01 917527     /lib/tls/i686/cmov/libdl-2.11.1.so
40296000-40297000 r--p 00001000 08:01 917527     /lib/tls/i686/cmov/libdl-2.11.1.so
40297000-40298000 rw-p 00002000 08:01 917527     /lib/tls/i686/cmov/libdl-2.11.1.so
40298000-402a1000 r-xp 00000000 08:01 917526     /lib/tls/i686/cmov/libcrypt-2.11.1.so
402a1000-402a2000 r--p 00008000 08:01 917526     /lib/tls/i686/cmov/libcrypt-2.11.1.so
402a2000-402a3000 rw-p 00009000 08:01 917526     /lib/tls/i686/cmov/libcrypt-2.11.1.so
402a3000-402ca000 rw-p 00000000 00:00 0 
402ca000-402ee000 r-xp 00000000 08:01 917545     /lib/tls/i686/cmov/libm-2.11.1.so
402ee000-402ef000 r--p 00023000 08:01 917545     /lib/tls/i686/cmov/libm-2.11.1.so
402ef000-402f0000 rw-p 00024000 08:01 917545     /lib/tls/i686/cmov/libm-2.11.1.so
402f0000-40443000 r-xp 00000000 08:01 917532     /lib/tls/i686/cmov/libc-2.11.1.so
40443000-40445000 r--p 00153000 08:01 917532     /lib/tls/i686/cmov/libc-2.11.1.so
40445000-40446000 rw-p 00155000 08:01 917532     /lib/tls/i686/cmov/libc-2.11.1.so
40446000-4044b000 rw-p 00000000 00:00 0 
4044b000-4048a000 r--p 00000000 08:01 270359     /usr/lib/locale/en_US.utf8/LC_CTYPE
4048a000-40491000 r--s 00000000 08:01 276998     /usr/lib/gconv/gconv-modules.cache
40491000-40512000 rw-p 00000000 00:00 0 
40512000-40514000 r-xp 00000000 08:01 1212489    /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
40514000-40515000 r--p 00001000 08:01 1212489    /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
40515000-40516000 rw-p 00002000 08:01 1212489    /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
40516000-40518000 r-xp 00000000 08:01 1212505    /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
40518000-40519000 r--p 00001000 08:01 1212505    /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
40519000-4051a000 rw-p 00002000 08:01 1212505    /execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
4051f000-4053c000 r-xp 00000000 08:01 917862     /lib/libgcc_s.so.1
4053c000-4053d000 r--p 0001c000 08:01 917862     /lib/libgcc_s.so.1
4053d000-4053e000 rw-p 0001d000 08:01 917862     /lib/libgcc_s.so.1
40976000-40eac000 rw-p 00000000 00:00 0          [heap]
bffe8000-bfffd000 rw-p 00000000 00:00 0          [stack]


[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

Raised fatal signal 6

Fork