[ruby-trunk - Bug #7332][Open] mswin64でminiruby.exeがSEGV

Issue #7332 has been reported by yoshidam (Yoshida Masato).


Bug #7332: mswin64でminiruby.exeがSEGV
https://bugs.ruby-lang.org/issues/7332

Author: yoshidam (Yoshida Masato)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-11-11) [x64-mswin64_110]

=begin
VS2012でmswin64のビルド中にminiruby.exeがSEGVし、ビルドに失敗します。

CC = cl -nologo
LD = cl -nologo
LDSHARED = cl -nologo -LD
CFLAGS = -MD -Zi -W2 -wd4996 -we4028 -we4142 -O2sy- -Zm600
XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/x64-mswin64_110 -I./include
-I. -I./missing
CPPFLAGS = -D_WIN32_WINNT=0x0602
DLDFLAGS = -incremental:no -debug -opt:ref -opt:icf -dll
SOLIBS =
./tool/mkconfig.rb:4: [BUG] Segmentation fault
ruby 2.0.0dev (2012-11-11) [x64-mswin64_110]

– Control frame information

c:0002 p:0011 s:0025 e:001440 EVAL ./tool/mkconfig.rb:4 [FINISH]
c:0001 p:0000 s:0002 e:001468 TOP [FINISH]

./tool/mkconfig.rb:4:in `’

– C level backtrace information

C:\Windows\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xa)
[0x000007F860092C2A]
C:\Windows\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x9a)
[0x000007F85D0910EA]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_vm_bugreport+0x94)
[0x000007F6ADC306EC] c:\users\yoshidam\ruby-trunk\vm_dump.c:668
C:\Users\yoshidam\ruby-trunk\miniruby.exe(report_bug+0x112)
[0x000007F6ADB67A7E] c:\users\yoshidam\ruby-trunk\error.c:308
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_bug+0x49)
[0x000007F6ADB66BF5] c:\users\yoshidam\ruby-trunk\error.c:329
C:\Users\yoshidam\ruby-trunk\miniruby.exe(sigsegv+0x48)
[0x000007F6ADBE1F7C] c:\users\yoshidam\ruby-trunk\signal.c:607
C:\Windows\SYSTEM32\MSVCR110.dll(XcptFilter+0x1a9) [0x000007F85132F2B5]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(__tmainCRTStartup$filt$0+0x16)
[0x000007F6ADC44E91]
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c:553
C:\Windows\SYSTEM32\MSVCR110.dll(_C_specific_handler+0x93)
[0x000007F85132E66F]
C:\Windows\SYSTEM32\ntdll.dll(RtlLookupFunctionEntry+0x26d)
[0x000007F8600B464D]
C:\Windows\SYSTEM32\ntdll.dll(DbgPrint+0x47c) [0x000007F8600B567C]
C:\Windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e)
[0x000007F860094BBA]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_gvar_get+0x0)
[0x000007F6ADC0FA74] c:\users\yoshidam\ruby-trunk\variable.c:722
C:\Users\yoshidam\ruby-trunk\miniruby.exe(vm_exec_core+0x552)
[0x000007F6ADC2A112] c:\users\yoshidam\ruby-trunk\vm.inc:332
C:\Users\yoshidam\ruby-trunk\miniruby.exe(vm_exec+0xa9)
[0x000007F6ADC296D9] c:\users\yoshidam\ruby-trunk\vm.c:1159
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_iseq_eval_main+0x7c)
[0x000007F6ADC24B18] c:\users\yoshidam\ruby-trunk\vm.c:1402
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_exec_internal+0xb1)
[0x000007F6ADB6ACE5] c:\users\yoshidam\ruby-trunk\eval.c:251
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_exec_node+0x1d)
[0x000007F6ADB6AD35] c:\users\yoshidam\ruby-trunk\eval.c:312
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_run_node+0x30)
[0x000007F6ADB6AF88] c:\users\yoshidam\ruby-trunk\eval.c:303
C:\Users\yoshidam\ruby-trunk\miniruby.exe(main+0x40)
[0x000007F6ADB41040] c:\users\yoshidam\ruby-trunk\main.c:38
C:\Users\yoshidam\ruby-trunk\miniruby.exe(__tmainCRTStartup+0x10f)
[0x000007F6ADC44B2F]
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c:536
C:\Windows\system32\KERNEL32.DLL(BaseThreadInitThunk+0x1a)
[0x000007F85D9F167E]

– Other runtime information

  • Loaded script: ./tool/mkconfig.rb

  • Loaded features:

0 enumerator.so

GENTRY型の大きさが32ビットのため、rb_gvar_getの引数entryの上位32ビットが失われているためと思われます。

diff -u vm_exec.h.org vm_exec.h
— vm_exec.h.org 2012-11-12 09:56:53.944698400 +0900
+++ vm_exec.h 2012-11-12 10:08:07.652124000 +0900
@@ -14,7 +14,7 @@

typedef long OFFSET;
typedef unsigned long lindex_t;
-typedef rb_num_t GENTRY;
+typedef VALUE GENTRY;
typedef rb_iseq_t *ISEQ;

#ifdef GCC
=end

Issue #7332 has been updated by usa (Usaku NAKAMURA).

Status changed from Open to Assigned
Assignee set to ko1 (Koichi Sasada)

確認して入れてください>笹田さん

Bug #7332: mswin64でminiruby.exeがSEGV
https://bugs.ruby-lang.org/issues/7332#change-32803

Author: yoshidam (Yoshida Masato)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-11-11) [x64-mswin64_110]

=begin
VS2012でmswin64のビルド中にminiruby.exeがSEGVし、ビルドに失敗します。

CC = cl -nologo
LD = cl -nologo
LDSHARED = cl -nologo -LD
CFLAGS = -MD -Zi -W2 -wd4996 -we4028 -we4142 -O2sy- -Zm600
XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/x64-mswin64_110 -I./include
-I. -I./missing
CPPFLAGS = -D_WIN32_WINNT=0x0602
DLDFLAGS = -incremental:no -debug -opt:ref -opt:icf -dll
SOLIBS =
./tool/mkconfig.rb:4: [BUG] Segmentation fault
ruby 2.0.0dev (2012-11-11) [x64-mswin64_110]

– Control frame information

c:0002 p:0011 s:0025 e:001440 EVAL ./tool/mkconfig.rb:4 [FINISH]
c:0001 p:0000 s:0002 e:001468 TOP [FINISH]

./tool/mkconfig.rb:4:in `’

– C level backtrace information

C:\Windows\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xa)
[0x000007F860092C2A]
C:\Windows\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x9a)
[0x000007F85D0910EA]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_vm_bugreport+0x94)
[0x000007F6ADC306EC] c:\users\yoshidam\ruby-trunk\vm_dump.c:668
C:\Users\yoshidam\ruby-trunk\miniruby.exe(report_bug+0x112)
[0x000007F6ADB67A7E] c:\users\yoshidam\ruby-trunk\error.c:308
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_bug+0x49)
[0x000007F6ADB66BF5] c:\users\yoshidam\ruby-trunk\error.c:329
C:\Users\yoshidam\ruby-trunk\miniruby.exe(sigsegv+0x48)
[0x000007F6ADBE1F7C] c:\users\yoshidam\ruby-trunk\signal.c:607
C:\Windows\SYSTEM32\MSVCR110.dll(XcptFilter+0x1a9) [0x000007F85132F2B5]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(__tmainCRTStartup$filt$0+0x16)
[0x000007F6ADC44E91]
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c:553
C:\Windows\SYSTEM32\MSVCR110.dll(_C_specific_handler+0x93)
[0x000007F85132E66F]
C:\Windows\SYSTEM32\ntdll.dll(RtlLookupFunctionEntry+0x26d)
[0x000007F8600B464D]
C:\Windows\SYSTEM32\ntdll.dll(DbgPrint+0x47c) [0x000007F8600B567C]
C:\Windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e)
[0x000007F860094BBA]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_gvar_get+0x0)
[0x000007F6ADC0FA74] c:\users\yoshidam\ruby-trunk\variable.c:722
C:\Users\yoshidam\ruby-trunk\miniruby.exe(vm_exec_core+0x552)
[0x000007F6ADC2A112] c:\users\yoshidam\ruby-trunk\vm.inc:332
C:\Users\yoshidam\ruby-trunk\miniruby.exe(vm_exec+0xa9)
[0x000007F6ADC296D9] c:\users\yoshidam\ruby-trunk\vm.c:1159
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_iseq_eval_main+0x7c)
[0x000007F6ADC24B18] c:\users\yoshidam\ruby-trunk\vm.c:1402
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_exec_internal+0xb1)
[0x000007F6ADB6ACE5] c:\users\yoshidam\ruby-trunk\eval.c:251
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_exec_node+0x1d)
[0x000007F6ADB6AD35] c:\users\yoshidam\ruby-trunk\eval.c:312
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_run_node+0x30)
[0x000007F6ADB6AF88] c:\users\yoshidam\ruby-trunk\eval.c:303
C:\Users\yoshidam\ruby-trunk\miniruby.exe(main+0x40)
[0x000007F6ADB41040] c:\users\yoshidam\ruby-trunk\main.c:38
C:\Users\yoshidam\ruby-trunk\miniruby.exe(__tmainCRTStartup+0x10f)
[0x000007F6ADC44B2F]
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c:536
C:\Windows\system32\KERNEL32.DLL(BaseThreadInitThunk+0x1a)
[0x000007F85D9F167E]

– Other runtime information

  • Loaded script: ./tool/mkconfig.rb

  • Loaded features:

0 enumerator.so

GENTRY型の大きさが32ビットのため、rb_gvar_getの引数entryの上位32ビットが失われているためと思われます。

diff -u vm_exec.h.org vm_exec.h
— vm_exec.h.org 2012-11-12 09:56:53.944698400 +0900
+++ vm_exec.h 2012-11-12 10:08:07.652124000 +0900
@@ -14,7 +14,7 @@

typedef long OFFSET;
typedef unsigned long lindex_t;
-typedef rb_num_t GENTRY;
+typedef VALUE GENTRY;
typedef rb_iseq_t *ISEQ;

#ifdef GCC
=end

Issue #7332 has been updated by ko1 (Koichi Sasada).

遅くなってすみません,入れました.

Bug #7332: mswin64でminiruby.exeがSEGV
https://bugs.ruby-lang.org/issues/7332#change-32929

Author: yoshidam (Yoshida Masato)
Status: Closed
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-11-11) [x64-mswin64_110]

=begin
VS2012でmswin64のビルド中にminiruby.exeがSEGVし、ビルドに失敗します。

CC = cl -nologo
LD = cl -nologo
LDSHARED = cl -nologo -LD
CFLAGS = -MD -Zi -W2 -wd4996 -we4028 -we4142 -O2sy- -Zm600
XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/x64-mswin64_110 -I./include
-I. -I./missing
CPPFLAGS = -D_WIN32_WINNT=0x0602
DLDFLAGS = -incremental:no -debug -opt:ref -opt:icf -dll
SOLIBS =
./tool/mkconfig.rb:4: [BUG] Segmentation fault
ruby 2.0.0dev (2012-11-11) [x64-mswin64_110]

– Control frame information

c:0002 p:0011 s:0025 e:001440 EVAL ./tool/mkconfig.rb:4 [FINISH]
c:0001 p:0000 s:0002 e:001468 TOP [FINISH]

./tool/mkconfig.rb:4:in `’

– C level backtrace information

C:\Windows\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xa)
[0x000007F860092C2A]
C:\Windows\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x9a)
[0x000007F85D0910EA]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_vm_bugreport+0x94)
[0x000007F6ADC306EC] c:\users\yoshidam\ruby-trunk\vm_dump.c:668
C:\Users\yoshidam\ruby-trunk\miniruby.exe(report_bug+0x112)
[0x000007F6ADB67A7E] c:\users\yoshidam\ruby-trunk\error.c:308
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_bug+0x49)
[0x000007F6ADB66BF5] c:\users\yoshidam\ruby-trunk\error.c:329
C:\Users\yoshidam\ruby-trunk\miniruby.exe(sigsegv+0x48)
[0x000007F6ADBE1F7C] c:\users\yoshidam\ruby-trunk\signal.c:607
C:\Windows\SYSTEM32\MSVCR110.dll(XcptFilter+0x1a9) [0x000007F85132F2B5]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(__tmainCRTStartup$filt$0+0x16)
[0x000007F6ADC44E91]
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c:553
C:\Windows\SYSTEM32\MSVCR110.dll(_C_specific_handler+0x93)
[0x000007F85132E66F]
C:\Windows\SYSTEM32\ntdll.dll(RtlLookupFunctionEntry+0x26d)
[0x000007F8600B464D]
C:\Windows\SYSTEM32\ntdll.dll(DbgPrint+0x47c) [0x000007F8600B567C]
C:\Windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e)
[0x000007F860094BBA]
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_gvar_get+0x0)
[0x000007F6ADC0FA74] c:\users\yoshidam\ruby-trunk\variable.c:722
C:\Users\yoshidam\ruby-trunk\miniruby.exe(vm_exec_core+0x552)
[0x000007F6ADC2A112] c:\users\yoshidam\ruby-trunk\vm.inc:332
C:\Users\yoshidam\ruby-trunk\miniruby.exe(vm_exec+0xa9)
[0x000007F6ADC296D9] c:\users\yoshidam\ruby-trunk\vm.c:1159
C:\Users\yoshidam\ruby-trunk\miniruby.exe(rb_iseq_eval_main+0x7c)
[0x000007F6ADC24B18] c:\users\yoshidam\ruby-trunk\vm.c:1402
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_exec_internal+0xb1)
[0x000007F6ADB6ACE5] c:\users\yoshidam\ruby-trunk\eval.c:251
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_exec_node+0x1d)
[0x000007F6ADB6AD35] c:\users\yoshidam\ruby-trunk\eval.c:312
C:\Users\yoshidam\ruby-trunk\miniruby.exe(ruby_run_node+0x30)
[0x000007F6ADB6AF88] c:\users\yoshidam\ruby-trunk\eval.c:303
C:\Users\yoshidam\ruby-trunk\miniruby.exe(main+0x40)
[0x000007F6ADB41040] c:\users\yoshidam\ruby-trunk\main.c:38
C:\Users\yoshidam\ruby-trunk\miniruby.exe(__tmainCRTStartup+0x10f)
[0x000007F6ADC44B2F]
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c:536
C:\Windows\system32\KERNEL32.DLL(BaseThreadInitThunk+0x1a)
[0x000007F85D9F167E]

– Other runtime information

  • Loaded script: ./tool/mkconfig.rb

  • Loaded features:

0 enumerator.so

GENTRY型の大きさが32ビットのため、rb_gvar_getの引数entryの上位32ビットが失われているためと思われます。

diff -u vm_exec.h.org vm_exec.h
— vm_exec.h.org 2012-11-12 09:56:53.944698400 +0900
+++ vm_exec.h 2012-11-12 10:08:07.652124000 +0900
@@ -14,7 +14,7 @@

typedef long OFFSET;
typedef unsigned long lindex_t;
-typedef rb_num_t GENTRY;
+typedef VALUE GENTRY;
typedef rb_iseq_t *ISEQ;

#ifdef GCC
=end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs