GNU bug report logs - #65051
internal_equal manipulates symbols with position without checking symbols-with-pos-enabled.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 4 Aug 2023 14:01:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 65051 <at> debbugs.gnu.org, acm <at> muc.de, monnier <at> iro.umontreal.ca
Subject: Re: bug#65051: internal_equal manipulates symbols with position
 without checking symbols-with-pos-enabled.
Date: Sat, 05 Aug 2023 15:13:22 +0300
> Date: Sat, 5 Aug 2023 11:52:52 +0000
> Cc: 65051 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
>   acm <at> muc.de
> From: Alan Mackenzie <acm <at> muc.de>
> 
> Hello, Eli.
> 
> On Sat, Aug 05, 2023 at 13:57:50 +0300, Eli Zaretskii wrote:
> > > Date: Sat, 5 Aug 2023 10:45:37 +0000
> > > Cc: 65051 <at> debbugs.gnu.org, acm <at> muc.de
> > > From: Alan Mackenzie <acm <at> muc.de>
> 
> [ .... ]
> 
> > > > So we can have two different copies of #<symbol foo at 42>, such that
> > > > their hex values are different?  Isn't that a bug? why don't we
> > > > conflate such identical symbols?
> 
> > > No, it's not a bug, anymore than having two `equal' copies of '(a b c)
> > > would be a bug.
> 
> > But with symbols we store them in obarray, and obarray ought to find
> > the existing slot for #<symbol foo at 42> and reuse it, rather than
> > create a new slot?
> 
> No, only the bare symbol is in the obarray.  The symbol with position
> itself is a pseudovector, with contents (i) a bare symbol (a Lisp_Object
> "pointing at" the obarray) and (ii) the unsigned integer position.

Please document this factoid in the ELisp manual, I think it's very
important, and having it undocumented is a Bad Thing.




This bug report was last modified 1 year and 317 days ago.

Previous Next


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