Project

General

Profile

Actions

Backport #8795

closed

"Null byte in string error" on Marshal.load

Added by mml (McClain Looney) over 10 years ago. Updated over 10 years ago.


Description

I have about 2M serialized ruby objects in a database (don't ask). The objects are serialized via Marshal.dump, then zipped, then base64 encoded before being saved. After upgrading to 2.0 (built from source), a tiny minority (3-4) of objects thusly stored will fail to Marshal.load, with "ArgumentError: Null byte in string"

Given that the other 1.9M objects load just fine, and the issue never manifested in 1.8.7 MRI, and further, that the zip CRC's & such were not corrupted, I suspect there may be some subtle bug in the Marshal.dump code.

Please see attached file for a sample. I'd be happy if there'd even be any way to "fix" said broken string, or even any insight into what might be going on, but I'm more worried that there may be a Marshal bug lurking..


Files

badblob (20 KB) badblob mml (McClain Looney), 08/16/2013 10:44 PM
badblob.raw (14.5 KB) badblob.raw mml (McClain Looney), 08/17/2013 10:30 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0