[#39052] Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yugui <yugui@...>

Redmine管理用プロジェクトに報告されてしまったので転送します。

12 messages 2009/08/09
[#39264] Re: Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yutaka Kanemoto <kinpoco@...> 2009/09/08

金本と申します。

[#39107] [Bug #1952] cannot stop with Ctrl+C — Usaku NAKAMURA <redmine@...>

Bug #1952: cannot stop with Ctrl+C

14 messages 2009/08/18

[#39167] [Bug #2000] Change the license to "GPLv2+ or Ruby's original". — Mamoru Tasaka <redmine@...>

Bug #2000: Change the license to "GPLv2+ or Ruby's original".

11 messages 2009/08/26

[#39193] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...>

In article <200908281827.n7SIRbaX003476@ci.ruby-lang.org>,

16 messages 2009/08/29
[#39194] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39195] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a988633.9553f10a.4496.483e@mx.google.com>,

[#39196] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39197] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a989f76.1602be0a.3de4.1131@mx.google.com>,

[#39198] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Yukihiro Matsumoto <matz@...> 2009/08/29

まつもと ゆきひろです

[#39206] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/31

なかだです。

[ruby-dev:38982] [Bug #1864] Ruby-1.8.7 $SAFE=4のarray/hashのrecursive比較でSecurityError

From: Kazuhiko Shiozaki <redmine@...>
Date: 2009-08-02 15:30:58 UTC
List: ruby-dev #38982
Bug #1864: Ruby-1.8.7 $SAFE=4のarray/hashのrecursive比較でSecurityError
http://redmine.ruby-lang.org/issues/show/1864

起票者: Kazuhiko Shiozaki
ステータス: Open, 優先度: Normal
ruby -v: ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

tDiaryのセキュアモード($SAFE=4)で、

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=16081
  Author: 	knu
  Date: 	Sat Apr 19 11:11:25 2008 UTC (15 months, 1 week ago)
  Log Message: 	
  * array.c (rb_ary_equal, rb_ary_eql, rb_ary_hash, rb_ary_cmp):
    Make Array#eql?, #hash, #== and #<=> use rb_exec_recursive() and
    handle recursive data properly.
  
  * hash.c (hash_equal, rb_hash_hash): Make Hash#eql?, #hash and #==
    use rb_exec_recursive() and handle recursive data properly.

以降、不可解なSecurityError例外が起きます。

再現する短いRubyコードを書けていない(というか、似たようなコードを書いたつもりでも、うまく動いてしまう)のですが、

  @referers = {
    'foo' => [2, 'foo'],
    'bar' => [1, 'bar']
  }

に対して、 @referers.values.sortで
  Insecure: can't modify hash (SecurityError)
  /home/tdiary/tdiary/core/tdiary.rb:285:in `<=>'
となったり、

  @scanner_map = {[nil, false]=>ERB::Compiler::SimpleScanner2,
                  [nil, true]=>ERB::Compiler::PercentScanner,
                  ["-", false]=>ERB::Compiler::ExplicitScanner}

に対して、 @scanner_map.fetch([nil, false], ERB::Compiler::TrimScanner)で
  Insecure: can't modify hash
  /usr/lib/ruby/1.8/erb.rb:274:in `hash'
  /usr/lib/ruby/1.8/erb.rb:274:in `fetch'
となったりします。

いずれのケースも、modifyしないはずなのに、"Insecure: can't modify hash"という
例外メッセージはおかしいのではないでしょうか。

どうぞよろしくお願いします。
かずひこ


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next