Project

General

Profile

Actions

Bug #1290

closed

lib/mkmf.rb:73: [BUG] Segmentation fault

Added by pegacorn (pegacorn jp) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-03-14 trunk 22957) [i386-mswin32]
Backport:
[ruby-dev:38169]

Description

=begin
VC++ 6.0 でビルド中に miniruby.exe が SEGV します。

.\miniruby.exe -I../../lib  ../../enc/make_encmake.rb --builtin-encs="ascii.obj us_ascii.obj unicode.obj utf_8.obj" --builtin-transes="newline.obj" enc.mk

G:/work/copy/ruby/trunk/lib/mkmf.rb:73: [BUG] Segmentation fault
ruby 1.9.2dev (2009-03-14 trunk 22957) [i386-mswin32]

-- control frame ----------
c:0008 p:---- s:0041 b:0041 l:0011a8 d:000040 IFUNC :block_given?
c:0007 p:0053 s:0039 b:0038 l:000037 d:000037 METHOD G:/work/copy/ruby/trunk/lib/mkmf.rb:73
c:0006 p:2993 s:0032 b:0032 l:000031 d:000031 TOP G:/work/copy/ruby/trunk/lib/mkmf.rb:1919
c:0005 p:---- s:0018 b:0018 l:000017 d:000017 FINISH
c:0004 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC :load
c:0003 p:0104 s:0012 b:0012 l:0024b4 d:000fbc EVAL ../../enc/make_encmake.rb:8
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0024b4 d:0024b4 TOP :508

../../enc/make_encmake.rb:8:in <main>' ../../enc/make_encmake.rb:8:in load'
G:/work/copy/ruby/trunk/lib/mkmf.rb:1919:in <top (required)>' G:/work/copy/ruby/trunk/lib/mkmf.rb:73:in config_string'

関係があるのかどうか調べていませんが、下記の警告に対応すると SEGV しなくなりました。

cl -nologo -MD -Zi -W2 -O2b2xg- -G6 -Zm600 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32 -I../../include -I../.. -I../../missing     -Foproc.obj -c -Tc../../proc.c

proc.c
../../proc.c(1650) : warning C4700: 値が割り当てられていないローカルな変数 'a' に対して参照が行われました。

Index: proc.c

--- proc.c (リビジョン 22957)
+++ proc.c (作業コピー)
@@ -1647,7 +1647,7 @@
else {
argc = check_argc(RARRAY_LEN(args));
}

  • ret = rb_method_call(argc, RARRAY_PTR(a), method);
  • ret = rb_method_call(argc, RARRAY_PTR(args), method);
    a = args;
    return ret;
    }
    =end
Actions

Also available in: Atom PDF

Like0
Like0