Project

General

Profile

Actions

Backport #3729

closed

Fwd: 1.9.1 has marshal bugs in everything but p129

Added by yugui (Yuki Sonoda) over 13 years ago. Updated over 4 years ago.

Status:
Closed
[ruby-core:31807]

Description

=begin
forward the mail to register it to redmine.

---------- Forwarded message ----------
From: Ryan Davis
Date: Sat, Aug 21, 2010 at 6:16 AM
Subject: [ruby-core:31806] 1.9.1 has marshal bugs in everything but p129
To:

Is there any chance we can release a 1.9.1 that fixes the current
marshal bugs? It is fixed in 1.9.2, so I know the patch exists
somewhere and could be merged over. Otherwise I think I'm going to
have to drop support for 1.9.1 early.

Summary of output:

1.9.1-p129: no failures
1.9.1-p243: fails test_dump_regexp_bug
1.9.1-p376: fails test_dump_symbol_bug
1.9.1-p378: fails test_dump_symbol_bug
1.9.1-p429: fails test_dump_symbol_bug
1.9.1-p430: fails test_dump_symbol_bug

test_marshal_bugs.rb:

-- ruby --

$: << "../../minitest/dev/lib"
require 'minitest/autorun'

class TestMarshalBugs < MiniTest::Unit::TestCase
  def test_dump_symbol_bug
    assert_roundtrip [:$!, 42]
  end

  def test_dump_regexp_bug
    assert_roundtrip [:match3, [:lit, /x/], [:str, "blah"]]
  end

  def assert_roundtrip obj
    assert_equal obj, Marshal.load(Marshal.dump(obj))
  end
end

outputs:

% multiruby bug.rb

... skipping output from 1.8.x

VERSION = 1.9.1-p129
CMD     = ~/.multiruby/install/1.9.1-p129/bin/ruby bug.rb

Loaded suite bug
Started
..
Finished in 0.000365 seconds.

2 tests, 2 assertions, 0 failures, 0 errors, 0 skips

RESULT = 0

VERSION = 1.9.1-p243
CMD     = ~/.multiruby/install/1.9.1-p243/bin/ruby bug.rb

Loaded suite bug
Started
E.
Finished in 0.000472 seconds.

  1) Error:
test_dump_regexp_bug(TestMarshalBugs):
TypeError: can't convert Regexp into String
    bug.rb:16:in load'     bug.rb:16:in assert_roundtrip'
    bug.rb:12:in `test_dump_regexp_bug'

2 tests, 1 assertions, 0 failures, 1 errors, 0 skips

RESULT = 256

VERSION = 1.9.1-p376
CMD     = ~/.multiruby/install/1.9.1-p376/bin/ruby bug.rb

Loaded suite bug
Started
E.
Finished in 0.000458 seconds.

  1) Error:
test_dump_symbol_bug(TestMarshalBugs):
ArgumentError: dump format error(0x0)
    bug.rb:16:in load'     bug.rb:16:in assert_roundtrip'
    bug.rb:8:in `test_dump_symbol_bug'

2 tests, 1 assertions, 0 failures, 1 errors, 0 skips

RESULT = 256

VERSION = 1.9.1-p378
CMD     = ~/.multiruby/install/1.9.1-p378/bin/ruby bug.rb

Loaded suite bug
Started
.E
Finished in 0.000457 seconds.

  1) Error:
test_dump_symbol_bug(TestMarshalBugs):
ArgumentError: dump format error(0x0)
    bug.rb:16:in load'     bug.rb:16:in assert_roundtrip'
    bug.rb:8:in `test_dump_symbol_bug'

2 tests, 1 assertions, 0 failures, 1 errors, 0 skips

RESULT = 256

VERSION = 1.9.1-p429
CMD     = ~/.multiruby/install/1.9.1-p429/bin/ruby bug.rb

Loaded suite bug
Started
.E
Finished in 0.000480 seconds.

  1) Error:
test_dump_symbol_bug(TestMarshalBugs):
ArgumentError: dump format error(0x0)
    bug.rb:16:in load'     bug.rb:16:in assert_roundtrip'
    bug.rb:8:in `test_dump_symbol_bug'

2 tests, 1 assertions, 0 failures, 1 errors, 0 skips

RESULT = 256

VERSION = 1.9.1-p430
CMD     = ~/.multiruby/install/1.9.1-p430/bin/ruby bug.rb

Loaded suite bug
Started
.E
Finished in 0.000447 seconds.

  1) Error:
test_dump_symbol_bug(TestMarshalBugs):
ArgumentError: dump format error(0x0)
    bug.rb:16:in load'     bug.rb:16:in assert_roundtrip'
    bug.rb:8:in `test_dump_symbol_bug'

2 tests, 1 assertions, 0 failures, 1 errors, 0 skips

RESULT = 256

... skipping output from 1.9.2

TOTAL RESULT = 5 failures out of 9

Passed: 1.9.2-p0, 1.9.1-p129, 1.8.6-p399, 1.8.7-p302
Failed: 1.9.1-p429, 1.9.1-p430, 1.9.1-p243, 1.9.1-p376, 1.9.1-p378

--
Yuki Sonoda (Yugui)

http://yugui.jp
=end


Related issues 1 (0 open1 closed)

Is duplicate of Backport191 - Backport #2548: Marshal dump/load fails when given an array containing certain (rather silly) symbolsClosedyugui (Yuki Sonoda)Actions
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to yugui (Yuki Sonoda)
  • Priority changed from 3 to Normal

=begin

=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

=begin
Fixed at r26249.
=end

Actions #3

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0