siphash faulty on arm little endian with word align - missing code
siphash.c check for "little endian+unaligned word access" and
"bigendian". But my arch : armv7-a cortex a9 is little endian word
aligned. This discard the loop that reduce the input below 8 bytes and a
case when the leftover is four bytes.
I found this issue via bundler as it uses the hash of an array (the
collision is "sub-setter".hash and "discoverer".hash has they both share
all other fields (platform and version both at 0.0.2).
I reported it back then as public
- testcase: "collision.rb" # on arm (odroid u2) #$ ruby ~/collision.rb #708079652 #708079652
p ["discoverer", Gem::Version.new("0.0.2"), "ruby"].hash
p ["sub-setter", Gem::Version.new("0.0.2"), "ruby"].hash
NB: For now I rebuild with those check for UNALIGNED_WORD_ACCESS removed and
at least I get way less conflict . This is no proper fix though.
#2 [ruby-core:58662] Updated by mame (Yusuke Endoh) over 3 years ago
I confirmed the issue on my BeagleBone Black.
$ ./miniruby -ve 'p ["discoverer".hash, "sub-setter".hash]' ruby 2.1.0dev (2013-11-28 trunk 43540) [armv7l-linux-eabihf] [-51053038, -51053038]
I think this is a bug of the siphash-c upstream:
The bug was introduced by nobu, interestingly.
Yusuke Endoh firstname.lastname@example.org
#3 Updated by nobu (Nobuyoshi Nakada) over 3 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100