Bug #3722

segfault in rb_iterate (1.9.3, r29057)

Added by Cezary (Cezary Baginski) about 9 years ago. Updated over 8 years ago.

Target version:
ruby -v:
ruby 1.9.3dev (2010-08-19 trunk 29056) [x86_64-linux]


Reproducible every time while running bundler + cucumber + rprofile on a private rails project
(hard to reduce).

The second attached contains a short gdb session using Ruby with -g3/-O0/-ggdb.

I know this isn't much, but let me know if there is anything else I can do to help out.


segfault.txt (2.75 KB) segfault.txt Cezary (Cezary Baginski), 08/20/2010 08:49 AM
segfault2.txt (5.48 KB) segfault2.txt Cezary (Cezary Baginski), 08/20/2010 08:49 AM

Associated revisions

Revision 7f5d559c
Added by yugui (Yuki Sonoda) almost 9 years ago

merges r29155 from trunk into ruby_1_9_2. fixes #3777, #3772 and #3722.

  • thread.c (ruby_suppress_tracing): restore the state and invoke the func with normal state. a patch from Satoshi Shiba at [ruby-dev:42162]. [ruby-core:31783]

git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e



Updated by Cezary (Cezary Baginski) about 9 years ago

I started tearing everything apart and came up with this minimal case:

% ruby --version
ruby 1.9.3dev (2010-08-19 trunk 29056) [x86_64-linux]

% cat fail.rb
require 'profile'
class A
include Enumerable

def each
yield 1
end { true }

% ruby fail.rb
fail.rb: [BUG] cfp consistency error - send
ruby 1.9.3dev (2010-08-19 trunk 29056) [x86_64-linux]

-- control frame ----------
c:0001 p:0000 s:0002 b:0002 l:002598 d:002598 TOP

-- C level backtrace information -------------------------------------------
ruby() [0x52af54]
ruby() [0x565192]
ruby(rb_bug+0xcf) [0x565298]
ruby() [0x514c98]
ruby() [0x5152f1]
ruby() [0x51a9b3]
ruby() [0x527a23]
ruby() [0x52844d]
ruby() [0x41786f]
ruby(ruby_exec_node+0x24) [0x417982]
ruby(ruby_run_node+0x3e) [0x417955]
ruby() [0x416111]
/lib/ [0x7f84bb51ac4d]
ruby() [0x415fe9]

You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details:

[1] 15653 abort ruby fail.rb



Updated by nobu (Nobuyoshi Nakada) almost 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r29155.
Cezary, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Also available in: Atom PDF