GNU bug report logs - #46722
test-map-into fails

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 23 Feb 2021 16:23:01 UTC

Severity: normal

Merged with 53365

Found in versions 27.2, 28.0.50, 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #64 received at 46722 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rgm <at> gnu.org, stefan <at> marxist.se, contovob <at> tcd.ie, dick.r.chiang <at> gmail.com,
 46722 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#46722: test-map-into fails
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





This bug report was last modified 3 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.