From: Naohisa Goto Date: 2011-07-22T12:18:16+09:00 Subject: [ruby-dev:44184] [Ruby 1.9 - Bug #4456] Time#strftime で %F 指定子に大きな幅を指定した際の不具合 Issue #4456 has been updated by Naohisa Goto. %Fの指定をもっと大きく(2**31-1=2147483647)すると i686-linux でも再現しました。 既出のパッチで治ります。 こういう場合はテストを追加または変更すべきでしょうか? % ruby -e 'Time.now.strftime("%2147483647F")' -e:1: [BUG] Segmentation fault ruby 1.9.4dev (2011-07-21 trunk 32598) [i686-linux] -- Control frame information ----------------------------------------------- c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :strftime c:0003 p:0023 s:0006 b:0006 l:00212c d:0008cc EVAL -e:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:00212c d:00212c TOP PS. 火曜夜遅くにcvs-admin@ruby-langに必要事項をメールしました。 ---------------------------------------- Bug #4456: Time#strftime で %F 指定子に大きな幅を指定した際の不具合 http://redmine.ruby-lang.org/issues/4456 Author: tadayoshi funaba Status: Assigned Priority: Normal Assignee: Naohisa Goto Category: core Target version: 1.9.3 ruby -v: - =begin $ ruby -e "Time.now.strftime('%100000F')" -e:1: [BUG] Segmentation fault ruby 1.9.3dev (2011-03-02) [i686-linux] -- Control frame information ----------------------------------------------- c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :(null) c:0003 p:0023 s:0006 b:0006 l:000d2c d:00034c EVAL -e:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:000d2c d:000d2c TOP -- Ruby level backtrace information ---------------------------------------- -e:1:in `
' Segmentation fault =end -- http://redmine.ruby-lang.org