You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/util/deephash
Joe Tsai 7e40071571
util/deephash: handle slice edge-cases (#5471)
It is unclear whether the lack of checking nil-ness of slices
was an oversight or a deliberate feature.
Lacking a comment, the assumption is that this was an oversight.

Also, expand the logic to perform cycle detection for recursive slices.
We do this on a per-element basis since a slice is semantically
equivalent to a list of pointers.

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2 years ago
..
testtype util/deephash: fix unexported time.Time hashing 2 years ago
debug.go util/deephash: add debug printer (#5460) 2 years ago
deephash.go util/deephash: handle slice edge-cases (#5471) 2 years ago
deephash_test.go util/deephash: handle slice edge-cases (#5471) 2 years ago
pointer.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2 years ago
pointer_norace.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2 years ago
pointer_race.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2 years ago
types.go util/deephash: specialize for netip.Addr and drop AppendTo support (#5402) 2 years ago
types_test.go util/deephash: move typeIsRecursive and canMemHash to types.go (#5386) 2 years ago