Giter Club home page Giter Club logo

digest-sha3-ruby's People

Contributors

bramski avatar foobarwidget avatar knu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digest-sha3-ruby's Issues

Support for Ruby 3?

It seems it's currently supporting Ruby (~> 2.2)
Do you have any plan to support Ruby ~>3.0?

Crashed: TypeError: superclass mismatch for class Digest::SHA3 (Object is given but was Digest::Base)

Has anyone run into this issue?

racecar_1  | => Crashed: TypeError: superclass mismatch for class Digest::SHA3 (Object is given but was Digest::Base)
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
racecar_1  | /usr/share/gems/gems/eth-0.4.12/lib/eth.rb:1:in `<main>'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
racecar_1  | /usr/share/gems/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/runtime.rb:61:in `each'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/runtime.rb:61:in `block in require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/runtime.rb:50:in `each'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/runtime.rb:50:in `require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler.rb:173:in `require'
racecar_1  | /opt/app/config/application.rb:20:in `<top (required)>'
racecar_1  | /opt/app/config/environment.rb:2:in `require_relative'
racecar_1  | /opt/app/config/environment.rb:2:in `<top (required)>'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
racecar_1  | /usr/share/gems/gems/racecar-2.2.0/lib/racecar/rails_config_file_loader.rb:17:in `load!'
racecar_1  | /usr/share/gems/gems/racecar-2.2.0/lib/racecar/cli.rb:26:in `run'
racecar_1  | /usr/share/gems/gems/racecar-2.2.0/lib/racecar/cli.rb:13:in `main'
racecar_1  | /usr/share/gems/gems/racecar-2.2.0/exe/racecar:9:in `start'
racecar_1  | /usr/share/gems/gems/racecar-2.2.0/exe/racecar:44:in `<top (required)>'
racecar_1  | /usr/bin/racecar:23:in `load'
racecar_1  | /usr/bin/racecar:23:in `<top (required)>'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in `load'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in `kernel_load'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:28:in `run'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/cli.rb:494:in `exec'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/cli.rb:30:in `dispatch'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/cli.rb:24:in `start'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/exe/bundle:49:in `block in <top (required)>'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
racecar_1  | /opt/app-root/src/.gem/ruby/gems/bundler-2.2.17/exe/bundle:37:in `<top (required)>'
racecar_1  | /opt/app-root/src/bin/bundle:23:in `load'
racecar_1  | /opt/app-root/src/bin/bundle:23:in `<main>'

Error installing gem on Ubuntu Servor

Hey,
I tried to install the gem on an Ubuntu server in order to run ethereum.rb.
But I got an error. This is the console report


sudo gem install digest-sha3
Building native extensions. This could take a while...
ERROR: Error installing digest-sha3:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/digest-sha3-1.1.0/ext/digest

/usr/bin/ruby2.3 -r ./siteconf20170620-36620-a9fw36.rb extconf.rb
checking for ruby/digest.h... yes
checking for rb_str_set_len()... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/digest-sha3-1.1.0/mkmf.log

current directory: /var/lib/gems/2.3.0/gems/digest-sha3-1.1.0/ext/digest
make "DESTDIR=" clean

current directory: /var/lib/gems/2.3.0/gems/digest-sha3-1.1.0/ext/digest
make "DESTDIR="
compiling KeccakF-1600-reference.c
compiling KeccakNISTInterface.c
compiling KeccakSponge.c
compiling displayIntermediateValues.c
displayIntermediateValues.c: In function ‘displayText’:
displayIntermediateValues.c:113:9: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(intermediateValueFile, text);
^
cc1: some warnings being treated as errors
Makefile:239: recipe for target 'displayIntermediateValues.o' failed
make: *** [displayIntermediateValues.o] Error 1

make failed, exit code 2

It seems the command fprintf(intermediateValueFile, text); in intermediateValues.c does not precise the type of text variable thus raises a warning and stops the compiler (Ubuntu has not been compiling with such warning since some recent update).

Would simply remplace fprintf(intermediateValueFile, "%s", text) fix the issue ?

TypeError in Ruby 2.2.0 and later

As of Ruby 2.2.0, digest-sha3 v1.0.2 now produces a TypeError. The problem also occurs in the current 2.3.0-dev build.

The problem doesn't occur in earlier versions of Ruby (verified: 1.9.3-p448, 2.0.0-p451, 2.1.2, 2.1.5).

Example:

2.2.0> require 'digest/sha3'
 => true
2.2.0> Digest::SHA3.digest("foo")
TypeError: wrong argument type Digest::SHA3 (expected digest)
    from (irb):2:in `reset'
    from (irb):2:in `digest'
    from (irb):2:in `digest'
    from (irb):2
    from /Users/bbuckley/.cache/rbenv/versions/2.2.0/bin/irb:11:in `<main>'

Digest::SHA3.hexdigest won't convert to string first

Greetings,

I tested out Digest::SHA3.hexdigest in ruby 1.9.3-p392 and this core dumps ruby when passed nil. This was tested on out an amazon instance: "Linux ip-10-197-43-170 3.2.39-6.88.amzn1.x86_64 #1 SMP Sat Mar 2 05:13:37 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux"

Here is demonstration:

[ec2-user@ip-10-197-43-170 digest]$ rvm use 1.9.3
Using /home/ec2-user/.rvm/gems/ruby-1.9.3-p392
[ec2-user@ip-10-197-43-170 digest]$ irb
1.9.3p392 :001 > require 'digest/sha1'
=> true
1.9.3p392 :002 > require 'digest/sha3'
=> true
1.9.3p392 :003 > Digest::SHA1.hexdigest nil
TypeError: can't convert nil into String
from (irb):3:in digest' from (irb):3:inhexdigest'
from (irb):3
from /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `

'
1.9.3p392 :004 > Digest::SHA3.hexdigest nil
/home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3/helpers.rb:4: [BUG] Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0025 p:---- s:0091 b:0091 l:000090 d:000090 CFUNC :digest
c:0024 p:0014 s:0087 b:0086 l:000085 d:000085 METHOD /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3/helpers.rb:4
c:0023 p:0018 s:0082 b:0082 l:0007c8 d:000081 EVAL (irb):4
c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0021 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :eval
c:0020 p:0028 s:0071 b:0071 l:000070 d:000070 METHOD /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80
c:0019 p:0033 s:0064 b:0063 l:000062 d:000062 METHOD /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb:254
c:0018 p:0031 s:0058 b:0058 l:001f38 d:000057 BLOCK /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:159
c:0017 p:0042 s:0050 b:0050 l:000049 d:000049 METHOD /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:273
c:0016 p:0011 s:0045 b:0045 l:001f38 d:000044 BLOCK /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:156
c:0015 p:0144 s:0041 b:0041 l:000024 d:000040 BLOCK /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :loop
c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :catch
c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228
c:0008 p:0046 s:0022 b:0022 l:001f38 d:001f38 METHOD /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:155
c:0007 p:0011 s:0019 b:0019 l:002648 d:000018 BLOCK /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:70
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch
c:0004 p:0183 s:0011 b:0011 l:002648 d:002648 METHOD /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69
c:0003 p:0142 s:0006 b:0006 l:001078 d:001ad8 EVAL /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/bin/irb:16
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001078 d:001078 TOP

-- Ruby level backtrace information ----------------------------------------
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in <main>' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:instart'
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:in catch' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:70:inblock in start'
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:155:in eval_input' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:ineach_top_level_statement'
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in catch' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:inblock in each_top_level_statement'
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in loop' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:243:inblock (2 levels) in each_top_level_statement'
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:156:in block in eval_input' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:273:insignal_status'
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:159:in block (2 levels) in eval_input' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb:254:inevaluate'
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:in evaluate' /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:ineval'
(irb):4:in irb_binding' /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3/helpers.rb:4:inhexdigest'
/home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3/helpers.rb:4:in `digest'

-- C level backtrace information -------------------------------------------
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x18f4e3) [0x7f9ccd6d94e3] vm_dump.c:796
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x627dd) [0x7f9ccd5ac7dd] error.c:258
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(rb_bug+0xb3) [0x7f9ccd5ad5d3] error.c:277
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x11da5f) [0x7f9ccd667a5f] signal.c:609
/lib64/libpthread.so.0(+0xf8e0) [0x7f9ccd33d8e0]
/home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3.so(+0xddb) [0x7f9cc3769ddb] sha3.c:109
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x188fbc) [0x7f9ccd6d2fbc] vm_insnhelper.c:404
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x180ef3) [0x7f9ccd6caef3] insns.def:1018
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x185499) [0x7f9ccd6cf499] vm.c:1236
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x1859bf) [0x7f9ccd6cf9bf] vm_eval.c:1050
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x185f45) [0x7f9ccd6cff45] vm_eval.c:1091
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x188fbc) [0x7f9ccd6d2fbc] vm_insnhelper.c:404
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x180ef3) [0x7f9ccd6caef3] insns.def:1018
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x185499) [0x7f9ccd6cf499] vm.c:1236
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x18998c) [0x7f9ccd6d398c] vm.c:640
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(rb_rescue2+0x166) [0x7f9ccd5b3a56] eval.c:647
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x17b62e) [0x7f9ccd6c562e] vm_eval.c:846
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x188fbc) [0x7f9ccd6d2fbc] vm_insnhelper.c:404
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x180ef3) [0x7f9ccd6caef3] insns.def:1018
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x185499) [0x7f9ccd6cf499] vm.c:1236
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x189fa2) [0x7f9ccd6d3fa2] vm.c:640
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(rb_catch_obj+0xba) [0x7f9ccd6c85ca] vm_eval.c:1554
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x17e66e) [0x7f9ccd6c866e] vm_eval.c:1530
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x188fbc) [0x7f9ccd6d2fbc] vm_insnhelper.c:404
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x180ef3) [0x7f9ccd6caef3] insns.def:1018
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x185499) [0x7f9ccd6cf499] vm.c:1236
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x189fa2) [0x7f9ccd6d3fa2] vm.c:640
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(rb_catch_obj+0xba) [0x7f9ccd6c85ca] vm_eval.c:1554
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x17e66e) [0x7f9ccd6c866e] vm_eval.c:1530
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x188fbc) [0x7f9ccd6d2fbc] vm_insnhelper.c:404
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x180ef3) [0x7f9ccd6caef3] insns.def:1018
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x185499) [0x7f9ccd6cf499] vm.c:1236
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(rb_iseq_eval_main+0xad) [0x7f9ccd6d4ecd] vm.c:1478
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(+0x686fa) [0x7f9ccd5b26fa] eval.c:204
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(ruby_exec_node+0x1d) [0x7f9ccd5b35fd] eval.c:251
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9(ruby_run_node+0x1c) [0x7f9ccd5b54ec] eval.c:244
irb() [0x40086b]
/lib64/libc.so.6(__libc_start_main+0xed) [0x7f9ccc6fc8ed]
irb() [0x400899]

-- Other runtime information -----------------------------------------------

  • Loaded script: irb

  • Loaded features:

    0 enumerator.so
    1 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
    2 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
    3 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
    4 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
    5 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
    6 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
    7 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
    8 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb
    9 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/e2mmap.rb
    10 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/init.rb
    11 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb
    12 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/inspector.rb
    13 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb
    14 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/extend-command.rb
    15 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/output-method.rb
    16 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/notifier.rb
    17 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/slex.rb
    18 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-token.rb
    19 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb
    20 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/src_encoding.rb
    21 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/magic-file.rb
    22 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
    23 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/input-method.rb
    24 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/locale.rb
    25 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb
    26 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
    27 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
    28 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
    29 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
    30 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
    31 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
    32 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/completion.rb
    33 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/set.rb
    34 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/adapter.rb
    35 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/adapter/base.rb
    36 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/mri.so
    37 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/clean.rb
    38 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/core_ext.rb
    39 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/wirble_compatibility.rb
    40 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee.rb
    41 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/prettyprint.rb
    42 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/pp.rb
    43 /home/ec2-user/.rvm/scripts/irbrc.rb
    44 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest.so
    45 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/digest.rb
    46 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
    47 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3/helpers.rb
    48 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3.so

  • Process memory map:

00400000-00401000 r-xp 00000000 ca:01 289734 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
00600000-00601000 rw-p 00000000 ca:01 289734 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
01856000-01eda000 rw-p 00000000 00:00 0 [heap]
7f9cc3554000-7f9cc3569000 r-xp 00000000 ca:01 23 /lib64/libgcc_s-4.7.2-20121109.so.1
7f9cc3569000-7f9cc3768000 ---p 00015000 ca:01 23 /lib64/libgcc_s-4.7.2-20121109.so.1
7f9cc3768000-7f9cc3769000 rw-p 00014000 ca:01 23 /lib64/libgcc_s-4.7.2-20121109.so.1
7f9cc3769000-7f9cc3770000 r-xp 00000000 ca:01 295836 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3.so
7f9cc3770000-7f9cc396f000 ---p 00007000 ca:01 295836 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3.so
7f9cc396f000-7f9cc3970000 rw-p 00006000 ca:01 295836 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/digest-sha3-1.0.1/lib/digest/sha3.so
7f9cc3970000-7f9cc3973000 r-xp 00000000 ca:01 290331 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest.so
7f9cc3973000-7f9cc3b73000 ---p 00003000 ca:01 290331 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest.so
7f9cc3b73000-7f9cc3b74000 rw-p 00003000 ca:01 290331 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest.so
7f9cc3b74000-7f9cc3b92000 r-xp 00000000 ca:01 4906 /usr/lib64/libselinux.so.1
7f9cc3b92000-7f9cc3d91000 ---p 0001e000 ca:01 4906 /usr/lib64/libselinux.so.1
7f9cc3d91000-7f9cc3d92000 r--p 0001d000 ca:01 4906 /usr/lib64/libselinux.so.1
7f9cc3d92000-7f9cc3d93000 rw-p 0001e000 ca:01 4906 /usr/lib64/libselinux.so.1
7f9cc3d93000-7f9cc3d95000 rw-p 00000000 00:00 0
7f9cc3d95000-7f9cc3dac000 r-xp 00000000 ca:01 3677 /lib64/libresolv-2.12.so
7f9cc3dac000-7f9cc3fac000 ---p 00017000 ca:01 3677 /lib64/libresolv-2.12.so
7f9cc3fac000-7f9cc3fad000 r--p 00017000 ca:01 3677 /lib64/libresolv-2.12.so
7f9cc3fad000-7f9cc3fae000 rw-p 00018000 ca:01 3677 /lib64/libresolv-2.12.so
7f9cc3fae000-7f9cc3fb0000 rw-p 00000000 00:00 0
7f9cc3fb0000-7f9cc3fb2000 r-xp 00000000 ca:01 7298 /lib64/libkeyutils.so.1.3
7f9cc3fb2000-7f9cc41b1000 ---p 00002000 ca:01 7298 /lib64/libkeyutils.so.1.3
7f9cc41b1000-7f9cc41b2000 r--p 00001000 ca:01 7298 /lib64/libkeyutils.so.1.3
7f9cc41b2000-7f9cc41b3000 rw-p 00002000 ca:01 7298 /lib64/libkeyutils.so.1.3
7f9cc41b3000-7f9cc41bd000 r-xp 00000000 ca:01 7309 /lib64/libkrb5support.so.0.1
7f9cc41bd000-7f9cc43bc000 ---p 0000a000 ca:01 7309 /lib64/libkrb5support.so.0.1
7f9cc43bc000-7f9cc43bd000 r--p 00009000 ca:01 7309 /lib64/libkrb5support.so.0.1
7f9cc43bd000-7f9cc43be000 rw-p 0000a000 ca:01 7309 /lib64/libkrb5support.so.0.1
7f9cc43be000-7f9cc43e6000 r-xp 00000000 ca:01 7305 /lib64/libk5crypto.so.3.1
7f9cc43e6000-7f9cc45e6000 ---p 00028000 ca:01 7305 /lib64/libk5crypto.so.3.1
7f9cc45e6000-7f9cc45e7000 r--p 00028000 ca:01 7305 /lib64/libk5crypto.so.3.1
7f9cc45e7000-7f9cc45e8000 rw-p 00029000 ca:01 7305 /lib64/libk5crypto.so.3.1
7f9cc45e8000-7f9cc45e9000 rw-p 00000000 00:00 0
7f9cc45e9000-7f9cc45ec000 r-xp 00000000 ca:01 4106 /lib64/libcom_err.so.2.1
7f9cc45ec000-7f9cc47eb000 ---p 00003000 ca:01 4106 /lib64/libcom_err.so.2.1
7f9cc47eb000-7f9cc47ec000 rw-p 00002000 ca:01 4106 /lib64/libcom_err.so.2.1
7f9cc47ec000-7f9cc48c5000 r-xp 00000000 ca:01 7307 /lib64/libkrb5.so.3.3
7f9cc48c5000-7f9cc4ac5000 ---p 000d9000 ca:01 7307 /lib64/libkrb5.so.3.3
7f9cc4ac5000-7f9cc4acf000 r--p 000d9000 ca:01 7307 /lib64/libkrb5.so.3.3
7f9cc4acf000-7f9cc4ad1000 rw-p 000e3000 ca:01 7307 /lib64/libkrb5.so.3.3
7f9cc4ad1000-7f9cc4b11000 r-xp 00000000 ca:01 7301 /lib64/libgssapi_krb5.so.2.2
7f9cc4b11000-7f9cc4d11000 ---p 00040000 ca:01 7301 /lib64/libgssapi_krb5.so.2.2
7f9cc4d11000-7f9cc4d12000 r--p 00040000 ca:01 7301 /lib64/libgssapi_krb5.so.2.2
7f9cc4d12000-7f9cc4d14000 rw-p 00041000 ca:01 7301 /lib64/libgssapi_krb5.so.2.2
7f9cc4d14000-7f9cc4d2a000 r-xp 00000000 ca:01 4089 /lib64/libz.so.1.2.5
7f9cc4d2a000-7f9cc4f2a000 ---p 00016000 ca:01 4089 /lib64/libz.so.1.2.5
7f9cc4f2a000-7f9cc4f2b000 rw-p 00016000 ca:01 4089 /lib64/libz.so.1.2.5
7f9cc4f2b000-7f9cc4f88000 r-xp 00000000 ca:01 24716 /usr/lib64/libssl.so.1.0.1e
7f9cc4f88000-7f9cc5187000 ---p 0005d000 ca:01 24716 /usr/lib64/libssl.so.1.0.1e
7f9cc5187000-7f9cc5190000 rw-p 0005c000 ca:01 24716 /usr/lib64/libssl.so.1.0.1e
7f9cc5190000-7f9cc532b000 r-xp 00000000 ca:01 24570 /lib64/libcrypto.so.1.0.1e
7f9cc532b000-7f9cc552b000 ---p 0019b000 ca:01 24570 /lib64/libcrypto.so.1.0.1e
7f9cc552b000-7f9cc5550000 rw-p 0019b000 ca:01 24570 /lib64/libcrypto.so.1.0.1e
7f9cc5550000-7f9cc5554000 rw-p 00000000 00:00 0
7f9cc5554000-7f9cc5555000 r-xp 00000000 ca:01 290326 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
7f9cc5555000-7f9cc5754000 ---p 00001000 ca:01 290326 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
7f9cc5754000-7f9cc5755000 rw-p 00000000 ca:01 290326 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
7f9cc5755000-7f9cc5757000 r-xp 00000000 ca:01 293454 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/mri.so
7f9cc5757000-7f9cc5956000 ---p 00002000 ca:01 293454 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/mri.so
7f9cc5956000-7f9cc5957000 rw-p 00001000 ca:01 293454 /home/ec2-user/.rvm/gems/ruby-1.9.3-p392/gems/looksee-1.1.0/lib/looksee/mri.so
7f9cc5957000-7f9cc5974000 r-xp 00000000 ca:01 3966 /lib64/libtinfo.so.5.7
7f9cc5974000-7f9cc5b74000 ---p 0001d000 ca:01 3966 /lib64/libtinfo.so.5.7
7f9cc5b74000-7f9cc5b78000 rw-p 0001d000 ca:01 3966 /lib64/libtinfo.so.5.7
7f9cc5b78000-7f9cc5b9a000 r-xp 00000000 ca:01 3934 /lib64/libncurses.so.5.7
7f9cc5b9a000-7f9cc5d9a000 ---p 00022000 ca:01 3934 /lib64/libncurses.so.5.7
7f9cc5d9a000-7f9cc5d9b000 rw-p 00022000 ca:01 3934 /lib64/libncurses.so.5.7
7f9cc5d9b000-7f9cc5dd5000 r-xp 00000000 ca:01 4233 /lib64/libreadline.so.6.0
7f9cc5dd5000-7f9cc5fd5000 ---p 0003a000 ca:01 4233 /lib64/libreadline.so.6.0
7f9cc5fd5000-7f9cc5fdd000 rw-p 0003a000 ca:01 4233 /lib64/libreadline.so.6.0
7f9cc5fdd000-7f9cc5fde000 rw-p 00000000 00:00 0
7f9cc5fde000-7f9cc5fe4000 r-xp 00000000 ca:01 290352 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
7f9cc5fe4000-7f9cc61e3000 ---p 00006000 ca:01 290352 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
7f9cc61e3000-7f9cc61e4000 rw-p 00005000 ca:01 290352 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
7f9cc61e4000-7f9cc61e6000 r-xp 00000000 ca:01 290368 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7f9cc61e6000-7f9cc63e6000 ---p 00002000 ca:01 290368 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7f9cc63e6000-7f9cc63e7000 rw-p 00002000 ca:01 290368 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7f9cc63e7000-7f9cc63e9000 r-xp 00000000 ca:01 290400 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7f9cc63e9000-7f9cc65e8000 ---p 00002000 ca:01 290400 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7f9cc65e8000-7f9cc65e9000 rw-p 00001000 ca:01 290400 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7f9cc65e9000-7f9ccc47a000 r--p 00000000 ca:01 19692 /usr/lib/locale/locale-archive
7f9ccc47a000-7f9ccc4d7000 r-xp 00000000 ca:01 3068 /lib64/libfreebl3.so
7f9ccc4d7000-7f9ccc6d6000 ---p 0005d000 ca:01 3068 /lib64/libfreebl3.so
7f9ccc6d6000-7f9ccc6d7000 r--p 0005c000 ca:01 3068 /lib64/libfreebl3.so
7f9ccc6d7000-7f9ccc6d8000 rw-p 0005d000 ca:01 3068 /lib64/libfreebl3.so
7f9ccc6d8000-7f9ccc6dc000 rw-p 00000000 00:00 0
7f9ccc6dc000-7f9ccc85d000 r-xp 00000000 ca:01 3651 /lib64/libc-2.12.so
7f9ccc85d000-7f9ccca5d000 ---p 00181000 ca:01 3651 /lib64/libc-2.12.so
7f9ccca5d000-7f9ccca61000 r--p 00181000 ca:01 3651 /lib64/libc-2.12.so
7f9ccca61000-7f9ccca62000 rw-p 00185000 ca:01 3651 /lib64/libc-2.12.so
7f9ccca62000-7f9ccca68000 rw-p 00000000 00:00 0
7f9ccca68000-7f9cccaea000 r-xp 00000000 ca:01 3659 /lib64/libm-2.12.so
7f9cccaea000-7f9cccce9000 ---p 00082000 ca:01 3659 /lib64/libm-2.12.so
7f9cccce9000-7f9ccccea000 r--p 00081000 ca:01 3659 /lib64/libm-2.12.so
7f9ccccea000-7f9cccceb000 rw-p 00082000 ca:01 3659 /lib64/libm-2.12.so
7f9cccceb000-7f9ccccf3000 r-xp 00000000 ca:01 3655 /lib64/libcrypt-2.12.so
7f9ccccf3000-7f9cccef2000 ---p 00008000 ca:01 3655 /lib64/libcrypt-2.12.so
7f9cccef2000-7f9cccef3000 r--p 00007000 ca:01 3655 /lib64/libcrypt-2.12.so
7f9cccef3000-7f9cccef4000 rw-p 00008000 ca:01 3655 /lib64/libcrypt-2.12.so
7f9cccef4000-7f9cccf22000 rw-p 00000000 00:00 0
7f9cccf22000-7f9cccf24000 r-xp 00000000 ca:01 3657 /lib64/libdl-2.12.so
7f9cccf24000-7f9ccd124000 ---p 00002000 ca:01 3657 /lib64/libdl-2.12.so
7f9ccd124000-7f9ccd125000 r--p 00002000 ca:01 3657 /lib64/libdl-2.12.so
7f9ccd125000-7f9ccd126000 rw-p 00003000 ca:01 3657 /lib64/libdl-2.12.so
7f9ccd126000-7f9ccd12d000 r-xp 00000000 ca:01 3679 /lib64/librt-2.12.so
7f9ccd12d000-7f9ccd32c000 ---p 00007000 ca:01 3679 /lib64/librt-2.12.so
7f9ccd32c000-7f9ccd32d000 r--p 00006000 ca:01 3679 /lib64/librt-2.12.so
7f9ccd32d000-7f9ccd32e000 rw-p 00007000 ca:01 3679 /lib64/librt-2.12.so
7f9ccd32e000-7f9ccd345000 r-xp 00000000 ca:01 3675 /lib64/libpthread-2.12.so
7f9ccd345000-7f9ccd544000 ---p 00017000 ca:01 3675 /lib64/libpthread-2.12.so
7f9ccd544000-7f9ccd545000 r--p 00016000 ca:01 3675 /lib64/libpthread-2.12.so
7f9ccd545000-7f9ccd546000 rw-p 00017000 ca:01 3675 /lib64/libpthread-2.12.so
7f9ccd546000-7f9ccd54a000 rw-p 00000000 00:00 0
7f9ccd54a000-7f9ccd777000 r-xp 00000000 ca:01 289735 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9.1
7f9ccd777000-7f9ccd977000 ---p 0022d000 ca:01 289735 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9.1
7f9ccd977000-7f9ccd97f000 rw-p 0022d000 ca:01 289735 /home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9.1
7f9ccd97f000-7f9ccd99b000 rw-p 00000000 00:00 0
7f9ccd99b000-7f9ccd9b9000 r-xp 00000000 ca:01 19676 /lib64/ld-2.12.so
7f9ccdaa1000-7f9ccdaa2000 rw-p 00000000 00:00 0
7f9ccdaa2000-7f9ccdaa9000 r--s 00000000 ca:01 19645 /usr/lib64/gconv/gconv-modules.cache
7f9ccdaa9000-7f9ccdbb0000 rw-p 00000000 00:00 0
7f9ccdbb2000-7f9ccdbb3000 rw-p 00000000 00:00 0
7f9ccdbb3000-7f9ccdbb4000 ---p 00000000 00:00 0
7f9ccdbb4000-7f9ccdbb8000 rw-p 00000000 00:00 0
7f9ccdbb8000-7f9ccdbb9000 r--p 0001d000 ca:01 19676 /lib64/ld-2.12.so
7f9ccdbb9000-7f9ccdbba000 rw-p 0001e000 ca:01 19676 /lib64/ld-2.12.so
7f9ccdbba000-7f9ccdbbb000 rw-p 00000000 00:00 0
7fff7f3b5000-7fff7f3d6000 rw-p 00000000 00:00 0 [stack]
7fff7f3ff000-7fff7f400000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted


This works fine in ruby 2.0.0

FYI,

Thank you!

-daniel

Proper SHA3 implementation?

Hey,

I'm trying to find a SHA3 library for Ruby, but it seems like every library (this one included) is, if I'm not mistaken, using an old version of Keccak for validation, not the actual standardized SHA3.

The most recent SHA3 test vectors say that the hash of the blank string should be:

A7FFC6F8BF1ED76651C14756A061D662F580FF4DE43B49FA82D80A4B80F8434A

however, in this library, it works out to:

C5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470

After some research, I found some pages that calculate both the original keccak and the sha3, and it confirms that the first output is correct. Here's one such page:

https://www.npmjs.com/package/js-sha3

And here's a blank test vector from the original docs:

http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/SHA3-256_Msg0.pdf

Which agrees with everything else, and shows that the output is wrong.

Is there any chance of getting this fixed? Or of adding an option to use the new variation?

What is the proper way to get a digest comparable to js-sha3?

I am trying to use digest-sha3-ruby to get an identical digest that is being created from a library that internally uses ethers https://github.com/ethers-io/ethers.js and ethers uses js-sha3 https://github.com/emn178/js-sha3 internally.

The thing that is particually challenging about all of this is, the version of js-sha3 ethers is using throws the error "INVALID_ARGUMENT - hex string must have 0x prefix" error if what is passed to it does not have '0x' at the start of it... So this library is prefixing the string going to the keccak256 function with '0x'...

And, it seems this keccak256 implementation is operating off of bytes, for example, both '0x0' and '0x00' have the same output:

ethers.utils.keccak256('0x0')
'0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a'
> ethers.utils.keccak256('0x00')
'0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a'

In ruby, totally different output:

[5] pry(main)> Digest::SHA3.new(256).hexdigest('0')
=> "044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d"
[6] pry(main)> Digest::SHA3.new(256).hexdigest('00')
=> "e3f0ae350ee09657933cd8202a4dd563c5af941f8054e6d7191e3246be378290"

# or even

[2] pry(main)> Digest::SHA3.new(256).hexdigest('0x0')
=> "77b7d82d931e1a403db0240b08c0716665eec4664af617c457918e4a67bc1810"
[3] pry(main)> Digest::SHA3.new(256).hexdigest('0x00')
=> "27489e20a0060b723a1748bdff5e44570ee9fae64141728105692eac6031e8a4"

I am wondering is there something I can do to get digest-sha3-ruby to have the same output as ethers.utils.keccak256() ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.