all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Pip Cet <pipcet@protonmail.com>
Cc: 71774@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	martin rudalics <rudalics@gmx.at>
Subject: bug#71774: 31.0.50; Hash table weakness broken?
Date: Wed, 26 Jun 2024 11:39:17 +0200	[thread overview]
Message-ID: <CCB404A3-13C1-4BEE-8044-821284AD0402@gmail.com> (raw)
In-Reply-To: <e45d851f-489a-478e-91c3-032e31e93397@gmx.at>

> Is it possible the problem is fixed by running (setq values nil) before (garbage-collect), or after it, or in between calls to (garbage-collect)? I've not had time to test on current emacs -Q, but on my running emacs session that appears to fix the problem.

Thank you, Pip! It's probably `values` indeed. The effect can also be circumvented by not returning the undead object to the REPL:

  (setq h (make-hash-table :weakness 'value))
  -> #s(hash-table weakness value)

  (progn (puthash t (list 3) h) nil)
  -> nil

  h
  -> #s(hash-table weakness value data (t (3)))

  (garbage-collect)

  h
  #s(hash-table weakness value)

> Of course I have no idea why it worked differently in older emacs versions.

It appears to be an effect of Stefan's change 84f72f19, possibly unintended.
Maybe we should take this opportunity to get rid of `values` altogether, or at least in `eval-last-sexp`.






  reply	other threads:[~2024-06-26  9:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 13:57 bug#71774: 31.0.50; Hash table weakness broken? martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-25 15:02 ` Eli Zaretskii
2024-06-25 17:19   ` Mattias Engdegård
2024-06-26  8:38     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26  9:39       ` Mattias Engdegård [this message]
2024-06-25 15:25 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26  8:37   ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26  8:46     ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26  9:08       ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26  9:12         ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26 13:23           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26 13:53             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26 14:11               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-27  7:19                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-27 18:42                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-27 23:42                     ` Stefan Kangas
2024-06-28 12:59                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-28  5:29                     ` Eli Zaretskii
2024-06-26 14:13             ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CCB404A3-13C1-4BEE-8044-821284AD0402@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=71774@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=pipcet@protonmail.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.