Backport #3712
closedSEGV fails to produce stack dump / backtrace in debug build
Description
=begin
Building mswin with /Od /MDd causes stack dumps to stop working. See 5) below.
Loaded suite test/ruby/test_rubyoptions
Started
.....F.......FF..F....F...........
Finished in 6.700383 seconds.
-
Failure:
test_debug(TestRubyOptions) [test/ruby/test_rubyoptions.rb:60]:
<[]> expected but was
<["ExceptionLoadError' at <internal:enc/prelude>:3 - cannot load such file -- enc/encdb.so", "Exception
LoadError' at internal:enc/prelude:3 - cannot load such file -- enc/trans/transdb.so"]>. -
Failure:
test_kanji(TestRubyOptions) [test/ruby/test_rubyoptions.rb:106]:
<[]> expected but was
<["C:/Users/Peter/Ruby/github/rubyinstaller/sandbox/build1/ruby.exe: unknown encoding name - EUC-JP (RuntimeError)"]>. -
Failure:
test_notfound(TestRubyOptions) [test/ruby/test_rubyoptions.rb:326]:
[ruby-core:23717].
Expected /.* -- ./notexist.rb (LoadError)/ to match "internal:lib/rubygems/custom_require:29:inrequire': cannot load such file -- rubygems (LoadError)\n\tfrom <internal:lib/rubygems/custom_require>:29:in
require'\n\tfrom internal:gem_prelude:171:inload_full_rubygems_library'\n\tfrom <internal:gem_prelude>:221:in
try_activate'\n\tfrom internal:lib/rubygems/custom_require:32:inrescue in require'\n\tfrom <internal:lib/rubygems/custom_require>:29:in
require'\n". -
Failure:
test_require(TestRubyOptions) [test/ruby/test_rubyoptions.rb:125]:
<["1"]> expected but was
<[]>. -
Failure:
test_segv_test(TestRubyOptions) [test/ruby/test_rubyoptions.rb:377]:
Expected /\A
-e:(?:1:)?\s[BUG]\sSegmentation\sfault\n
ruby\ 1.9.3dev\ (2010-08-17\ trunk\ 29019)\ [i386-mswin32_100]\n\n
--\scontrol\sframe\s----------\n
(?:c:.\n)
---------------------------\n
(?:
--\sRuby\slevel\sbacktrace\sinformation\s----------------------------------------\n
-e:1:in\s`'\n
-e:1:in\s`kill'\n
)?
\n
(?:
--\sC\slevel\sbacktrace\sinformation\s-------------------------------------------\n
(?:(?:.\s)?[0x\h+]\n)\n
)?
[NOTE]\n
You\smay\shave\sencountered\sa\sbug\sin\sthe\sRuby\sinterpreter\sor\sextension\slibraries.\n
Bug\sreports\sare\swelcome.\n
For\sdetails:\shttp://www.ruby-lang.org/bugreport.html\n
\n
(?:[\s\w.']*)
\z
/x to match "-e:1: [BUG] Segmentation fault\nruby 1.9.3dev (2010-08-17 trunk 29019) [i386-mswin32_100]\n\n-- control frame ----------\n".
34 tests, 162 assertions, 5 failures, 0 errors, 0 skips
Test run options: --seed 6131
=end
Files
Updated by pweldon (Peter Weldon) over 14 years ago
- File bug3712.patch bug3712.patch added
=begin
Dereferencing an uninitialized pointer variable (block_iseq) in vm_dump.c (control_frame_dump), causes a segv while attempting to dump the control frames.
Patch attached that fixes the initialization.
nmake check
debug before patch : 6902 tests, 1843847 assertions, 11 failures, 5 errors, 34 skips
debug after patch : 6902 tests, 1843849 assertions, 11 failures, 4 errors, 34 skips
release before patch: 6902 tests, 1843849 assertions, 11 failures, 4 errors, 34 skips
release after patch : 6902 tests, 1843849 assertions, 11 failures, 4 errors, 34 skips
ps. rb_control_frame_t.block_iseq does not appear to be used. Open an issue to remove it?
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29040.
Peter, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
=begin
Hi,
At Thu, 19 Aug 2010 04:33:08 +0900,
Peter Weldon wrote in [ruby-core:31760]:
ps. rb_control_frame_t.block_iseq does not appear to be used. Open an issue to remove it?
Indeed, thanks for pointing out. Please open new one.
--
Nobu Nakada
=end