[MacRuby] #1138: Segfault when opening or Digesting a large file

MacRuby ruby-noreply at macosforge.org
Fri Jan 28 19:17:25 PST 2011


#1138: Segfault when opening or Digesting a large file
------------------------------------+---------------------------------------
 Reporter:  steven.buxton@…         |       Owner:  lsansonetti@…        
     Type:  defect                  |      Status:  new                  
 Priority:  blocker                 |   Milestone:                       
Component:  MacRuby                 |    Keywords:                       
------------------------------------+---------------------------------------
 I am attempting to calculate SHA1 hashes of very large ( > 1GB ) files.
 This works fine in MRI 1.9.2 but segfaults in macruby 0.8 and 1/27
 nightly.

 require 'digest/sha1'
 Digest::SHA1.file('some huge file').hexdigest

 The above code will segfault 100% of the time with files larger then 1GB.
 I can also produce the same segfault with the following:


 File.open('some huge file', 'rb') do |file|
      while blk = file.read(1024)
           #do stuff
      end
 end

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1138>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list