Project

General

Profile

Actions

Bug #576

closed

Segfault if Class.new is aliased

Added by jredville (Jim Deville) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.8.7 (2009-02-01 revision 21927) [i686-linux]
[ruby-core:18749]

Description

=begin
By aliasing Class.new, one can get around the lack of MatchData.new (and presumably other hidden new methods). If one uses this to try and create a new MatchData, and then calls an instance method of the new MatchData object, Ruby segfaults. This has been tested and reproduced on Ruby 1.8.6p111 and Ruby 1.8.6 HEAD.
=end


Files

temp.rb (99 Bytes) temp.rb Example code jredville (Jim Deville), 09/20/2008 05:49 AM
Actions #1

Updated by akr (Akira Tanaka) almost 16 years ago

  • ruby -v set to ruby 1.8.7 (2009-02-01 revision 21927) [i686-linux]

=begin
It is reproducible without alias:

% ruby-1.8 -ve 'MatchData.allocate.pre_match'
ruby 1.8.7 (2009-02-01 revision 21927) [i686-linux]
-e:1: [BUG] Segmentation fault
ruby 1.8.7 (2009-02-01 revision 21927) [i686-linux]

=end

Actions #2

Updated by shyouhei (Shyouhei Urabe) almost 16 years ago

  • Assignee set to matz (Yukihiro Matsumoto)

=begin

=end

Actions #3

Updated by matz (Yukihiro Matsumoto) almost 16 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r21997.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0