Project

General

Profile

Actions

Bug #3742

closed

failed to allocate memory: /^()(?>\g<1>)*$/ on x64-mswin64

Added by beuniv (shintaro kuwamoto) about 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2010-08-25 trunk 29091) [x64-mswin64_90]
Backport:
[ruby-dev:42133]

Description

=begin
http://redmine.ruby-lang.org/issues/show/3459 の続きです。
SEGVするのはr29074で修正していただいたので、そもそもの原因であるメモリ確保失敗のチケットを作っておきます。

Z:\trunk\build>nmake test-all TESTS=ruby/test_regexp.rb

Microsoft(R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

     .\ruby.exe -I../lib -I".ext/x64-mswin64_90" "../tool/runruby.rb" --extou

t=".ext" -- "../test/runner.rb" ruby/test_regexp.rb
Loaded suite ../test/runner
Started
...........F..E.....................................................
Finished in 3.292000 seconds.

  1. Failure:
    test_dup_warn(TestRegexp) [Z:/trunk/test/ruby/test_regexp.rb:828]:
    <[]> expected but was
    <["internal:gem_prelude:50: warning: assigned but unused variable - paths",
    "internal:gem_prelude:182: warning: assigned but unused variable - path",
    "internal:gem_prelude:177: warning: assigned but unused variable - installed_
    path",
    "internal:gem_prelude:122: warning: assigned but unused variable - verbose",
    "internal:gem_prelude:122: warning: assigned but unused variable - debug",
    "internal:gem_prelude:232: warning: assigned but unused variable - e",
    "internal:lib/rubygems/defaults:54: warning: assigned but unused variable - e
    xec_format",
    "internal:lib/rubygems/custom_require:30: warning: assigned but unused variab
    le - load_error"]>.

  2. Error:
    test_exec(TestRegexp):
    RegexpError: failed to allocate memory: /^()(?>\g<1>)*$/
    Z:/trunk/test/ruby/test_regexp.rb:500:in block in check' Z:/trunk/test/ruby/test_regexp.rb:498:in each'
    Z:/trunk/test/ruby/test_regexp.rb:498:in check' Z:/trunk/test/ruby/test_regexp.rb:569:in test_exec'
    ../test/runner.rb:26:in `'

68 tests, 1005 assertions, 1 failures, 1 errors, 0 skips

Test run options: --seed 9589
NMAKE : fatal error U1077: '.\ruby.exe' : リターン コード '0x2'
Stop.
=end


Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #3459: test_regexp.rb Segmentation fault on x64-mswin64Closed06/21/2010Actions
Related to Backport192 - Backport #3743: Segmentation fault on TestRegexp#test_execClosedyugui (Yuki Sonoda)08/25/2010Actions
Actions #1

Updated by beuniv (shintaro kuwamoto) about 14 years ago

=begin
次のパッチでテスト通るようになりました。

Index: ../regint.h

--- ../regint.h (リビジョン 29091)
+++ ../regint.h (作業コピー)
@@ -720,7 +720,7 @@
BBuf* mbuf; /* multi-byte info or NULL */
} CClassNode;

-typedef long OnigStackIndex;
+typedef SIGNED_VALUE OnigStackIndex;

typedef struct _OnigStackType {
unsigned int type;

Z:\trunk\build>nmake test-all TESTS=ruby/test_regexp.rb

Microsoft(R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

     .\ruby.exe -I../lib -I".ext/x64-mswin64_90" "../tool/runruby.rb" --extou

t=".ext" -- "../test/runner.rb" ruby/test_regexp.rb
Loaded suite ../test/runner
Started
...........F........................................................
Finished in 0.275000 seconds.

  1. Failure:
    test_dup_warn(TestRegexp) [Z:/trunk/test/ruby/test_regexp.rb:828]:
    <[]> expected but was
    <["internal:gem_prelude:50: warning: assigned but unused variable - paths",
    "internal:gem_prelude:182: warning: assigned but unused variable - path",
    "internal:gem_prelude:177: warning: assigned but unused variable - installed_
    path",
    "internal:gem_prelude:122: warning: assigned but unused variable - verbose",
    "internal:gem_prelude:122: warning: assigned but unused variable - debug",
    "internal:gem_prelude:232: warning: assigned but unused variable - e",
    "internal:lib/rubygems/defaults:54: warning: assigned but unused variable - e
    xec_format",
    "internal:lib/rubygems/custom_require:30: warning: assigned but unused variab
    le - load_error"]>.

68 tests, 1072 assertions, 1 failures, 0 errors, 0 skips

Test run options: --seed 23864
NMAKE : fatal error U1077: '.\ruby.exe' : リターン コード '0x1'
Stop.
=end

Actions #2

Updated by usa (Usaku NAKAMURA) about 14 years ago

  • Status changed from Open to Assigned
  • Assignee set to naruse (Yui NARUSE)

=begin

=end

Actions #3

Updated by naruse (Yui NARUSE) about 14 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29102.
shintaro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions #4

Updated by naruse (Yui NARUSE) about 14 years ago

=begin
追跡ありがとうございます。
regint.hはオリジナルの鬼車由来の部分だったので、intptr_t でコミットしました。

で、このバグはオリジナルの鬼車にも影響するので、うちの日記 http://d.hatena.ne.jp/nurse/あたりに
他の 5.9.2 に対する修正とともにまとめようと思っているのですが、
このパッチのライセンスは Ruby's or 鬼車のライセンスとしてよいでしょうか。
=end

Actions #5

Updated by beuniv (shintaro kuwamoto) about 14 years ago

=begin

このパッチのライセンスは Ruby's or 鬼車のライセンスとしてよいでしょうか。

はい、Ruby's or 鬼車のライセンスでお願いします。
そのうちr29074含めて1.9.2にもバックポートしていただけると助かります。
=end

Actions #6

Updated by naruse (Yui NARUSE) about 14 years ago

=begin

このパッチのライセンスは Ruby's or 鬼車のライセンスとしてよいでしょうか。

はい、Ruby's or 鬼車のライセンスでお願いします。

ありがとうございます。

そのうちr29074含めて1.9.2にもバックポートしていただけると助かります。

ちょうどタイミングよく同じ問題を訴えてきた人がいたので、Backport #3743 というチケットにしています。
yugui さんよろしぅ
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0