Subject: bug#46722: test-map-into fails

From: Stefan Monnier <[email-masked]>
Date: Wed, 05 Jan 2022 13:24:40 -0500

> Is it? how so?  copy-sequence is not a trivial operation, at least not
> with arbitrary data structures.

This is used on the `key` argument of `gethash/puthash` on a hash-table
defined to use `:test #'equal`.  And it is used on a value which is
defined to be a list.

For this reason, I think it is very safe.

The reason why the current code only misfires "rarely" is that in most
cases, when we change by side-effect an object that's a key in an
`equal` hashtable, the result is a hashtable where this entry can't be
found (because its hash doesn't match any more), so we end up
luckily not making use of this (now broken) entry.

So the underlying bug only appears if either the hash-table is rehashed
or the new `sxhash-equal` value happens to the same as the old one.

> And we nowadays use generics a lot, so this could potentially affect
> gobs of code.  So I'd rather we didn't install this on the
> release branch.

Fine by me,

        Stefan