Project

General

Profile

Bug #5211

Segmentation fault in Enumerator#each

Added by woollyams (Mike Williams) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]
Backport:
[ruby-core:39043]

Description

Under ruby-1.9.2-p290, on OS X Lion, the following code

@e1 = %w(strike strike strike).to_enum
@e2 = [1,2,3].to_enum

p [@e1.next, @e2.next]
p [@e1.next, @e2.next]
p [@e1.next, @e2.next]

Fails with a Segmentation fault.

Same code works fine in both ruby-1.9.2-p180 and ruby-1.9.3dev.


Files

ruby-192-fiber-bug.rb (131 Bytes) ruby-192-fiber-bug.rb code that triggers the problem woollyams (Mike Williams), 08/22/2011 03:31 PM
ruby-192-fiber-bug.out (845 Bytes) ruby-192-fiber-bug.out output woollyams (Mike Williams), 08/22/2011 03:31 PM
ruby_2011-08-22-162147_dukeofyork.crash (8.7 KB) ruby_2011-08-22-162147_dukeofyork.crash OS X crash report woollyams (Mike Williams), 08/22/2011 03:31 PM

Related issues

Is duplicate of Ruby master - Bug #5082: test_context_switch(TestMarshal) was failed on OS X 10.7 (Lion)Closed07/23/2011Actions

History

Updated by mrkn (Kenta Murata) over 8 years ago

  • Status changed from Open to Rejected
  • Assignee set to mrkn (Kenta Murata)
  • Priority changed from 5 to Normal

On 1.9.3, I cannot reproduce this issue using gcc-4.2 with -O3 and llvm-gcc with -O0 on OS X 10.7 (Lion).
Which version of gcc do you use to compile ruby?
llvm-gcc and clang with -On (n>0) are not supported to build 1.9.3.

On the other hand, the present ruby_1_9_2 branch doesn't support Lion. Backporting #5074 is able to resolve this.
llvm-gcc and clang are still not supported to build 1.9.2 even if #5074 were to be backported.

Please use gcc-4.2 for building 1.9.2 and 1.9.3.

Also available in: Atom PDF