Backport #8467
closed
Rewinding and iterating through gzipped IO leads to segmentation fault
Added by vicente.mundim (Vicente Mundim) over 11 years ago.
Updated over 11 years ago.
Description
The following steps reproduce the bug in 2.0.0:
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
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r41014.
Vicente, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
zlib.c: check EOF
- ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),
(gzreader_gets): check EOF. [ruby-core:55220] [Bug #8467]
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 2.0.0: REQUIRED
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Category deleted (
lib)
- Status changed from Closed to Assigned
- Assignee set to nagachika (Tomoyuki Chikanaga)
- Status changed from Assigned to Closed
This issue was solved with changeset r41073.
Vicente, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 41014: [Backport #8467]
* ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),
(gzreader_gets): check EOF. [ruby-core:55220] [Bug #8467]
* ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),
(gzreader_gets): check EOF. [ruby-core:55220] [Bug #8467]
* lib/cgi/util.rb: All class methods moduleized.
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0