[#78633] ruby/spec needs help from CRuby committers — Benoit Daloze <eregontp@...>

Currently, ruby/spec is maintained mostly by individuals and enjoys the

13 messages 2016/12/13

[ruby-core:78741] [Ruby trunk Bug#13054] MatchData segfaults if RMatch::regexp is nil

From: k@...
Date: 2016-12-20 07:12:47 UTC
List: ruby-core #78741
Issue #13054 has been reported by Kazuki Yamaguchi.

----------------------------------------
Bug #13054: MatchData segfaults if RMatch::regexp is nil
https://bugs.ruby-lang.org/issues/13054

* Author: Kazuki Yamaguchi
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: REQUIRED
----------------------------------------
[Bug #10877] and [Bug #13042] didn't fix all of the issues.

The following four examples cause segfault for me:

~~~ruby
"abc".sub("a", ""); $~.hash
"abc".sub("a", ""); $~.names
"abc".sub("a", ""); $~.named_captures
"abc".sub("a", ""); m=$~; m.regexp; "abc".sub("a", ""); $~ == m
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next