Project

General

Profile

Actions

Backport #3712

closed

SEGV fails to produce stack dump / backtrace in debug build

Added by pweldon (Peter Weldon) over 14 years ago. Updated over 13 years ago.

Status:
Closed
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:in require'\n\tfrom internal:gem_prelude:171:in load_full_rubygems_library'\n\tfrom <internal:gem_prelude>:221:in try_activate'\n\tfrom internal:lib/rubygems/custom_require:32:in rescue in require'\n\tfrom <internal:lib/rubygems/custom_require>:29:in require'\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://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

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

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #3723: Remove unused control frame variable: rb_control_frame_t.block_iseqRejectedko1 (Koichi Sasada)08/20/2010Actions
Actions #1

Updated by pweldon (Peter Weldon) over 14 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

Actions #2

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

Actions #3

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

Actions #4

Updated by pweldon (Peter Weldon) over 14 years ago

=begin
Done. #3723
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0