Project

General

Profile

Actions

Bug #109

closed

SEGV by File.foreach("keywords")

Added by Anonymous almost 16 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:
[ruby-dev:34988]

Description

=begin
以下のようにすると SEGV します。

% ./ruby -ve '
e = File.foreach("keywords")
loop {
p e.next
}
'
ruby 1.9.0 (2008-06-07 revision 16875) [i686-linux]
"%{\n"
"struct kwtable {const char *name; int id[2]; enum lex_state_e state;};\n"
-e:4: [BUG] Segmentation fault
ruby 1.9.0 (2008-06-07 revision 16875) [i686-linux]

-- stack frame ------------
0000 (0xb7ac2008): 00000004
0001 (0xb7ac200c): 00000001
0002 (0xb7ac2010): 00000004
0003 (0xb7ac2014): 00000001
0004 (0xb7ac2018): 0819c320
0005 (0xb7ac201c): 00000004
0006 (0xb7ac2020): 00000001
0007 (0xb7ac2024): 00000004
0008 (0xb7ac2028): 00000004
0009 (0xb7ac202c): b7b41f75
0010 (0xb7ac2030): 00000004
0011 (0xb7ac2034): b7ac2021 (= 6)
0012 (0xb7ac2038): 00000004
0013 (0xb7ac203c): 0819c320
0014 (0xb7ac2040): 00000004
0015 (0xb7ac2044): 00000001 <- lfp <- dfp
-- control frame ----------
c:0007 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC :next
c:0006 p:0010 s:0013 b:0012 l:000006 d:000011 BLOCK -e:4
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH :class_eval
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :loop
c:0003 p:0024 s:0007 b:0007 l:000006 d:000006 TOP -e:3
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :private_class_method
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :17

DBG> : "-e:4:in next'" DBG> : "-e:4:in block in '"
DBG> : "-e:3:in loop'" DBG> : "-e:3:in '"
-- backtrace of native function call (Use addr2line) --
0x810b7ba
0x8132e9e
0x8132efb
0x80cb360
0xb7f5d440
0x80ff7d2
0x81035eb
0x810850e
0x805aaf7
0x80fa193
0x8105fb3
0x80ff7d2
0x81035eb
0x81037e3
0x805a10c
0x805a1af
0x8058ba5
0xb7dbeea8
0x8058aa1

zsh: abort ./ruby -ve ' e = File.foreach("keywords") loop { p e.next } '

[田中 哲][たなか あきら][Tanaka Akira]
=end


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #121: SEGV by File.foreach("keywords")ClosedActions
Actions #1

Updated by matz (Yukihiro Matsumoto) almost 16 years ago

  • Assignee set to ko1 (Koichi Sasada)

=begin

=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 16 years ago

  • Status changed from Open to Closed

=begin

=end

Actions #3

Updated by nobu (Nobuyoshi Nakada) almost 16 years ago

  • % Done changed from 0 to 100

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0