[ruby-core:78292] [Ruby trunk Bug#12974] Marshal.dump dumps core.

From: nobu@...
Date: 2016-11-24 11:32:40 UTC
List: ruby-core #78292
Issue #12974 has been updated by Nobuyoshi Nakada.

Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED

----------------------------------------
Bug #12974: Marshal.dump dumps core.
https://bugs.ruby-lang.org/issues/12974#change-61656

* Author: Shyouhei Urabe
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.4.0dev (2016-11-24 trunk 56892) [x86_64-darwin15]
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
----------------------------------------
```ruby
Hash.include Module.new {
  def marshal_dump
    dup
  end

  def marshal_load this
    initialize_copy this
  end
}

p Marshal.load(Marshal.dump(foo:"bar"))
```

This script dumps core.



-- 
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