From: Nathaniel Talbott Date: 2005-04-15T23:01:30+09:00 Subject: Re: Segfault in zlib? On 4/14/05, Nathaniel Talbott wrote: > I'm using rubyzip (latest gem version) and zlib (1.2.2) to do a bunch > of zip manipulation, and am getting an occasional segfault: > > c:/ruby/lib/ruby/gems/1.8/gems/rubyzip-0.5.8/lib/zip/zip.rb:200: > [BUG] Segmentation fault > ruby 1.8.2 (2005-04-03) [i386-mswin32] > > Since rubyzip is pure Ruby, I'm suspecting the problem is in zlib. I > wish I could provide more details, but unfortunately, I haven't found > a reproducible scenario for this problem yet. OK, I have a reproducible case now: require 'rubygems' require 'zip/zipfilesystem' include Zip STDOUT.sync = true FILE_NAME = "test.zip" Thread.abort_on_exception = true threads = [] 5.times do threads << Thread.new do loop do print '.' ZipFile.open(FILE_NAME) do |z| z.each do |e| z.read(e) end end end end sleep(0.5) end threads.each{|t| t.join} This file (t.rb) and ruby interpreter I'm running it with (on Windows XP sp2) is in the test zip file I've uploaded here: http://talbott.ws/personal/test.zip Using that zip file I usually get a segfault around 5 dots or so. Thanks, -- Nathaniel <:((><