Project

General

Profile

Actions

Backport #8467

closed

Rewinding and iterating through gzipped IO leads to segmentation fault

Added by vicente.mundim (Vicente Mundim) almost 11 years ago. Updated almost 11 years ago.


Description

The following steps reproduce the bug in 2.0.0:

  • Create a file and gzip it in a terminal:

    echo "some content" > compressed_file && gzip compressed_file

Then start a IRB session with the following code:

require 'zlib'
filename = "compressed_file.gz"
io = Zlib::GzipReader.new(open(filename, 'rb'))
io.rewind
io.each {} # segmentation_fault in Ruby 2.0.0

This works in Ruby 1.9.3, 1.9.2, and 1.8.7.


Files

zlib_bug.rb (152 Bytes) zlib_bug.rb File with code to reproduce bug vicente.mundim (Vicente Mundim), 06/01/2013 12:15 AM
ruby_2013-05-31-121414_vm-imac.crash (8.99 KB) ruby_2013-05-31-121414_vm-imac.crash Crash report vicente.mundim (Vicente Mundim), 06/01/2013 12:15 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0