Project

General

Profile

Actions

Bug #1934

closed

Segmentation fault

Added by jeheine (Julia Heine) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9]
Backport:
[ruby-core:24894]

Description

=begin
When executing the program attached, I get the following segmentation fault. The segmentation fault is reproducible, but not at a deterministic point in the evaluation (so far somewhere between the 170th and the 205th prime). On previous patch-levels, I also got the segmentation fault.

/Users/julia/Ruby/Euler/euler060a.rb:85: [BUG] Segmentation fault
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9]

-- control frame ----------
c:0018 p:0014 s:0064 b:0062 l:000534 d:000061 BLOCK /Users/julia/Ruby/Euler/euler060a.rb:85
c:0017 p:---- s:0059 b:0059 l:000058 d:000058 FINISH
c:0016 p:---- s:0057 b:0057 l:000056 d:000056 CFUNC :each
c:0015 p:0056 s:0054 b:0054 l:000534 d:000053 BLOCK /Users/julia/Ruby/Euler/euler060a.rb:85
c:0014 p:---- s:0049 b:0049 l:000048 d:000048 FINISH
c:0013 p:---- s:0047 b:0047 l:000046 d:000046 CFUNC :each
c:0012 p:0153 s:0044 b:0044 l:000534 d:000043 BLOCK /Users/julia/Ruby/Euler/euler060a.rb:82
c:0011 p:---- s:0039 b:0039 l:000038 d:000038 FINISH
c:0010 p:---- s:0037 b:0037 l:000036 d:000036 CFUNC :call
c:0009 p:0018 s:0033 b:0033 l:000025 d:000032 BLOCK /opt/local/lib/ruby1.9/1.9.1/prime.rb:265
c:0008 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0007 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :loop
c:0006 p:0049 s:0026 b:0026 l:000025 d:000025 METHOD /opt/local/lib/ruby1.9/1.9.1/prime.rb:264
c:0005 p:0045 s:0021 b:0021 l:000020 d:000020 METHOD /opt/local/lib/ruby1.9/1.9.1/prime.rb:137
c:0004 p:0023 s:0015 b:0015 l:000014 d:000014 METHOD (eval):3
c:0003 p:0104 s:0010 b:0010 l:000534 d:000e04 EVAL /Users/julia/Ruby/Euler/euler060a.rb:58
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000534 d:000534 TOP :26660

-- Ruby level backtrace information-----------------------------------------
/Users/julia/Ruby/Euler/euler060a.rb:85:in block (3 levels) in <main>' /Users/julia/Ruby/Euler/euler060a.rb:85:in each'
/Users/julia/Ruby/Euler/euler060a.rb:85:in block (2 levels) in <main>' /Users/julia/Ruby/Euler/euler060a.rb:82:in each'
/Users/julia/Ruby/Euler/euler060a.rb:82:in block in <main>' /opt/local/lib/ruby1.9/1.9.1/prime.rb:265:in call'
/opt/local/lib/ruby1.9/1.9.1/prime.rb:265:in block in each' /opt/local/lib/ruby1.9/1.9.1/prime.rb:264:in loop'
/opt/local/lib/ruby1.9/1.9.1/prime.rb:264:in each' /opt/local/lib/ruby1.9/1.9.1/prime.rb:137:in each'
(eval):3:in each' /Users/julia/Ruby/Euler/euler060a.rb:58:in '

-- C level backtrace information -------------------------------------------

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
=end


Files

euler060a.rb (3.47 KB) euler060a.rb Ruby program that leads to segmentation fault jeheine (Julia Heine), 08/13/2009 06:20 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0