Project

General

Profile

Backport #1655

fdiv の使用で Segmentation fault が発生する

Added by tadf (tadayoshi funaba) over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal

Description

=begin
fdiv の使用で Segmentation fault が発生します。

リリースしたものでも、trunk でも同様です。
引数のどちらかに 0 があるとおかしくなるような気がします。

$ ruby191 -e '(Float::MAX.to_i*2).fdiv(0)'
-e:1: [BUG] Segmentation fault
ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

-- control frame ----------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :fdiv
c:0003 p:0030 s:0006 b:0006 l:0025a4 d:001a1c EVAL -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0025a4 d:0025a4 TOP :17


-- Ruby level backtrace information-----------------------------------------
-e:1:in fdiv'
-e:1:in
'

-- C level backtrace information -------------------------------------------
0x81210c8 ruby191(rb_vm_bugreport+0x48) [0x81210c8]
0x814d089 ruby191 [0x814d089]
0x814d11b ruby191(rb_bug+0x2b) [0x814d11b]
0x80d3b56 ruby191 [0x80d3b56]
0xb7fd2440 [0xb7fd2440]
0x8139839 ruby191 [0x8139839]
0x81142b6 ruby191 [0x81142b6]
0x81163ff ruby191 [0x81163ff]
0x811ac8a ruby191 [0x811ac8a]
0x811ae25 ruby191(rb_iseq_eval_main+0x95) [0x811ae25]
0x805ce3f ruby191(ruby_exec_node+0x9f) [0x805ce3f]
0x805e532 ruby191(ruby_run_node+0x42) [0x805e532]
0x805bdf0 ruby191(main+0x60) [0x805bdf0]
0xb7e08450 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7e08450]
0x805bd21 ruby191 [0x805bd21]

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

Aborted

$ ./ruby -e '(Float::MAX.to_i*2).fdiv(0)'
-e:1: [BUG] Segmentation fault
ruby 1.9.2dev (2009-06-18 trunk 23734) [i686-linux]

-- control frame ----------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :fdiv
c:0003 p:0030 s:0006 b:0006 l:001ac4 d:002484 EVAL -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001ac4 d:001ac4 TOP


-e:1:in <main>'
-e:1:in
fdiv'

-- C level backtrace information -------------------------------------------
./ruby(rb_vm_bugreport+0xbd) [0x81649ad]
./ruby [0x819e099]
./ruby(rb_bug+0x2b) [0x819e13b]
./ruby [0x80f9065]
[0xb7fe2440]
./ruby [0x8187d5a]
./ruby [0x815fdd0]
./ruby [0x81534c9]
./ruby [0x815b3c6]
./ruby(rb_iseq_eval_main+0x19b) [0x815b66b]
./ruby(ruby_exec_node+0x94) [0x805d2c4]
./ruby(ruby_run_node+0x42) [0x805f2f2]
./ruby(main+0x60) [0x805c5b0]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7e18450]
./ruby [0x805c4e1]

[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

Aborted
=end

History

#1

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to yugui (Yuki Sonoda)

=begin
fixed at r23739.
=end

#2

Updated by yugui (Yuki Sonoda) almost 10 years ago

  • Status changed from Assigned to Closed

=begin
merged at r23801.
=end

Also available in: Atom PDF