H
Han Holl
Searching for a non-existing string in a mmapped region produces a segfault.
Run the following little program:
require 'mmap'
file = "/usr/bin/ruby"
fma = Mmap.new(file, "r", Mmap::MAP_SHARED, {'offset' => 8192, 'length' => 4096})
puts fma.index("\n#\n", 12)
fma.unmap
Under 1.8.0:
tt.rb:10: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i686-linux]
Aborted
With 1.6.8:
nil
Cheers,
Han Holl
Run the following little program:
require 'mmap'
file = "/usr/bin/ruby"
fma = Mmap.new(file, "r", Mmap::MAP_SHARED, {'offset' => 8192, 'length' => 4096})
puts fma.index("\n#\n", 12)
fma.unmap
Under 1.8.0:
tt.rb:10: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i686-linux]
Aborted
With 1.6.8:
nil
Cheers,
Han Holl