Project

General

Profile

Backport #3712

SEGV fails to produce stack dump / backtrace in debug build

Added by pweldon (Peter Weldon) almost 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:31757]

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.

1) Failure:
test_debug(TestRubyOptions) [test/ruby/test_rubyoptions.rb:60]:
<[]> expected but was
<["Exception LoadError' 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"]>.

2) 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)"]>.

3) 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:in require': cannot load such file -- rubygems (LoadError)\n\tfrom <internal:lib/rubygems/custom_require>:29:inrequire'\n\tfrom internal:gem_prelude:171:in load_full_rubygems_library'\n\tfrom <internal:gem_prelude>:221:intry_activate'\n\tfrom internal:lib/rubygems/custom_require:32:in rescue in require'\n\tfrom <internal:lib/rubygems/custom_require>:29:inrequire'\n".

4) Failure:
test_require(TestRubyOptions) [test/ruby/test_rubyoptions.rb:125]:
<["1"]> expected but was
<[]>.

5) 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:\/\/
\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

bug3712.patch (316 Bytes) bug3712.patch pweldon (Peter Weldon), 08/19/2010 04:33 AM

Related issues

Related to Ruby master - Bug #3723: Remove unused control frame variable: rb_control_frame_t.block_iseqRejected08/20/2010Actions

History

#1

Updated by pweldon (Peter Weldon) almost 9 years ago

=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

#2

Updated by nobu (Nobuyoshi Nakada) almost 9 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

#3

Updated by nobu (Nobuyoshi Nakada) almost 9 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

#4

Updated by pweldon (Peter Weldon) almost 9 years ago

=begin
Done. #3723
=end

Also available in: Atom PDF