-
-
Save hannahwhy/1255166 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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