Skip to content

Instantly share code, notes, and snippets.

@hannahwhy
Created September 30, 2011 22:25
Show Gist options
  • Select an option

  • Save hannahwhy/1255166 to your computer and use it in GitHub Desktop.

Select an option

Save hannahwhy/1255166 to your computer and use it in GitHub Desktop.
$ uname -mprsv
Darwin 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 i386
$ ~/src/rubinius/bin/rbx -v
rubinius 2.0.0dev (1.8.7 1a792212 yyyy-mm-dd JI) [x86_64-apple-darwin10.8.0]
$ ~/src/rubinius/bin/rbx zlib_crash_example.rb
Segmentation fault
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
$ ruby zlib_crash_example.rb
$ echo $?
0
require 'zlib'
require 'stringio'
input = '.' * (2 ** 23)
output = StringIO.new
writer = Zlib::GzipWriter.new(output)
writer.write(input)
writer.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment