I am using the latest version from ale/3.0 branch and spend a few hours tracking down a bug caused by a hash collision of two constants.
Here is a minimal working example:
julia> using Metatheory
julia> a = [0x0000000000000080, 0x0000000000100000, 0x0000000000000400, 0x0000000000000100]
4-element Vector{UInt64}:
0x0000000000000080
0x0000000000100000
0x0000000000000400
0x0000000000000100
julia> b = [0x0000000000000100, 0x0000000000100000, 0x0000000000000080, 0x0000000000000400]
4-element Vector{UInt64}:
0x0000000000000100
0x0000000000100000
0x0000000000000080
0x0000000000000400
julia> a == b
false
julia> hash(a) == hash(b)
true
julia> EGraph(:($a - $b))
EGraph{Expr, Nothing} with 2 e-classes:
1 => [UInt64[0x0000000000000080, 0x0000000000100000, 0x0000000000000400, 0x0000000000000100]]
2 => [%1 - %1]
I don't know how to solve this problem since VecExpr of a constant only stores the hash, I think, and therefore can't be used to point to the correct constant.
PS: Thanks to mxhbl from discourse for documenting a simple hash collision in julia :).
I am using the latest version from
ale/3.0branch and spend a few hours tracking down a bug caused by a hash collision of two constants.Here is a minimal working example:
I don't know how to solve this problem since
VecExprof a constant only stores the hash, I think, and therefore can't be used to point to the correct constant.PS: Thanks to mxhbl from discourse for documenting a simple hash collision in julia :).