mmhash128_4(::Integer, ::Unsigned, ::UInt32) is missing (breaks 32bit)
oxinabox opened this issue · 3 comments
I am using ShortString.jl on a 32 bit system.
On a 32 bit system mmhash128_a
is mmhash128_4
which is used here:
https://github.com/JuliaString/ShortStrings.jl/blob/fcacbe7e596f0a2544c3a62ab3500775dbcf139c/src/hash.jl#L3-L6
I get this error from hash
ing a ShortString
:
LoadError: MethodError: no method matching unsafe_load(::UInt32)
Closest candidates are:
unsafe_load(!Matched::Ptr) at pointer.jl:105
unsafe_load(!Matched::Ptr, !Matched::Integer) at pointer.jl:105
Stacktrace:
[1] mmhash128_4(::Int32, ::UInt32, ::UInt32) at depot/packages/MurmurHash3/rOsVB/src/MurmurHash3.jl:408
[2] hash at depot/packages/ShortStrings/j6S0g/src/ShortStrings.jl:16 [inlined]
The code that is hit is :.
Note that we are passing in a UInt
rather than a Ptr
MurmurHash3.jl/src/MurmurHash3.jl
Lines 405 to 418 in a7beaab
I think the problem is that a method is missing.
On a 64 bit system mmhash128_8_a
is hit, and it has an overload that takes an Unsigned
MurmurHash3.jl/src/MurmurHash3.jl
Lines 123 to 124 in a7beaab
OK! When I was adapting MurmurHash3 to make ShortString efficient, it looks like I missed that 32-bit case!
I'll try to fix this weekend
bump
Fixed by PR #13