GNU bug report logs - #48666
Leaks are still possible in hook--depth-alist

Previous Next

Package: emacs;

Reported by: jakanakaevangeli <at> chiru.no

Date: Wed, 26 May 2021 08:53:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48666 in the body.
You can then email your comments to 48666 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#48666; Package emacs. (Wed, 26 May 2021 08:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jakanakaevangeli <at> chiru.no:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 May 2021 08:53:02 GMT) Full text and rfc822 format available.

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

From: jakanakaevangeli <at> chiru.no
To: bug-gnu-emacs <at> gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Leaks are still possible in hook--depth-alist
Date: Wed, 26 May 2021 10:57:47 +0200
    (with-temp-buffer
      (add-hook 'post-command-hook (make-symbol "fun-sym") 77 t))
    (get 'post-command-hook 'hook--depth-alist)

Perhaps hook--depth-alist could be a hash table with weak keys.

Best regards.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48666; Package emacs. (Tue, 22 Feb 2022 15:26:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: jakanakaevangeli <at> chiru.no
Cc: 48666 <at> debbugs.gnu.org, Daniel Mendler <mail <at> daniel-mendler.de>
Subject: Re: bug#48666: Leaks are still possible in hook--depth-alist
Date: Tue, 22 Feb 2022 10:25:35 -0500
jakanakaevangeli <at> chiru.no [2021-05-26 10:57:47] wrote:
>     (with-temp-buffer
>       (add-hook 'post-command-hook (make-symbol "fun-sym") 77 t))
>     (get 'post-command-hook 'hook--depth-alist)
> Perhaps hook--depth-alist could be a hash table with weak keys.

I just pushed to `master` a patch which should hopefully fix this
problem for good (basically, the depth alist is now kept in an(other)
variable (so for functions added to the buffer-local portion of the
hook, the depth is stored in the buffer-local portion of the depth
variable)).

I hope it will also fix the problems seen in
https://github.com/minad/corfu/issues/133

It makes it a bit harder to check if the old problem is still present or
not, OTOH, because the depth-alist isn't just a quick (get <hook>
'hook--depth-alist) away but you need to (symbol-value (get <hook>
'hook--depth-alist)) and that will only show you the global portion or
the portion relevant to the current buffer.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48666; Package emacs. (Fri, 15 Jul 2022 10:41:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 48666 <at> debbugs.gnu.org, jakanakaevangeli <at> chiru.no,
 Daniel Mendler <mail <at> daniel-mendler.de>
Subject: Re: bug#48666: Leaks are still possible in hook--depth-alist
Date: Fri, 15 Jul 2022 12:40:01 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I just pushed to `master` a patch which should hopefully fix this
> problem for good (basically, the depth alist is now kept in an(other)
> variable (so for functions added to the buffer-local portion of the
> hook, the depth is stored in the buffer-local portion of the depth
> variable)).

This was several months ago, so presumably Stefan's change fixed this
issue, and I'm therefore closing this bug report.  If the issue is still
present, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 48666 <at> debbugs.gnu.org and jakanakaevangeli <at> chiru.no Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 15 Jul 2022 10:41:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Aug 2022 11:24:09 GMT) Full text and rfc822 format available.

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

Previous Next


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