Project

General

Profile

Actions

Bug #13485

closed

MinGW TestEnumerable#test_callcc SEGV info

Added by MSP-Greg (Greg L) almost 7 years ago. Updated about 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-04-18 trunk 58397) [x64-mingw32]
[ruby-core:<unknown>]
Tags:

Description

Re the patch needed in MinGW builds for TestEnumerable#test_callcc (file test/ruby/test_enum.rb), I ran the following code with --disable-gems:

require_relative '<path to ruby>/lib/ruby/2.5.0/x64-mingw32/continuation.so'

1000.times {
  c = nil
  o = Object.new
  class << o; self; end.class_eval do
    define_method(:<=>) do |x|
      callcc {|c2| c ||= c2 }
      0
    end
  end
  ary = [o,o]
  begin
    ary.sort_by {|x| x }
    c.to_s ; c.call
  rescue
  end
}

Attached is a file with the code and the SEGV output when running. I removed the ruby path to shorten it.

Note that if the line -

    c.to_s ; c.call

is replaced with -

    c.call

my system hangs/stops. No output, no response; have to force the command window closed...


Files

TestEnumerable#call_cc_SEGV.txt (4.01 KB) TestEnumerable#call_cc_SEGV.txt Code & SEGV output MSP-Greg (Greg L), 04/19/2017 04:14 PM

Updated by MSP-Greg (Greg L) over 1 year ago

Not sure about what/when/where, but this test is passing and there is no longer a patch in ruby-loco.

Hence, ok to close. Sorry.

Actions #2

Updated by hsbt (Hiroshi SHIBATA) about 1 year ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0