Skip to content

Commit b3284fc

Browse files
committed
bits_hash uses the value of the pointers, not the pointers.
1 parent 976e557 commit b3284fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/builtins.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,8 @@ static uintptr_t immut_id_(jl_datatype_t *dt, jl_value_t *v, uintptr_t h) JL_NOT
400400
// a few select pointers (notably symbol) also have special hash values
401401
// which may affect the stability of the objectid hash, even though
402402
// they don't affect egal comparison
403-
return bits_hash((const void*)jl_gc_get_ptr_hash(v), sz) ^ h;
403+
// return bits_hash((const void*)jl_gc_get_ptr_hash(v), sz) ^ h;
404+
return bits_hash(v, sz) ^ h;
404405
}
405406
if (dt == jl_unionall_type)
406407
return type_object_id_(v, NULL);

0 commit comments

Comments
 (0)