GNU bug report logs - #53310
[PATCH] cannot use memory-report-object-size in pristine session

Previous Next

Package: emacs;

Reported by: Sergey Vinokurov <serg.foo <at> gmail.com>

Date: Sun, 16 Jan 2022 23:49:01 UTC

Severity: normal

Tags: patch

Fixed in version 28.1

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 53310 in the body.
You can then email your comments to 53310 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#53310; Package emacs. (Sun, 16 Jan 2022 23:49:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey Vinokurov <serg.foo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 16 Jan 2022 23:49:01 GMT) Full text and rfc822 format available.

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

From: Sergey Vinokurov <serg.foo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] cannot use memory-report-object-size in pristine session
Date: Sun, 16 Jan 2022 23:48:06 +0000
[Message part 1 (text/plain, inline)]
When I try to to use memory-report-object-size I get following error on 
Emacs 28.0 pretest:


$ emacs --batch -Q --eval "(progn (require 'memory-report) (message 
\"%s\" (memory-report-object-size '(a b \"cd\"))))"
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  #f(compiled-function (counted value) #<bytecode 
-0x1a1202ad2c7fe610>)(#<hash-table eq 1/19 0x157c06d25887> (a b "cd"))
  apply(#f(compiled-function (counted value) #<bytecode 
-0x1a1202ad2c7fe610>) #<hash-table eq 1/19 0x157c06d25887> (a b "cd") nil)
  memory-report--object-size-1(#<hash-table eq 1/19 0x157c06d25887> (a 
b "cd"))
  memory-report--object-size(#<hash-table eq 1/19 0x157c06d25887> (a b 
"cd"))
  memory-report-object-size((a b "cd"))
  (message "%s" (memory-report-object-size '(a b "cd")))
  (progn (require 'memory-report) (message "%s" 
(memory-report-object-size '(a b "cd"))))
  command-line-1(("--eval" "(progn (require 'memory-report) (message 
\"%s\" (mem..."))
  command-line()
  normal-top-level()


While this command line does work:


$ emacs --batch -Q --eval "(progn (require 'memory-report) 
(memory-report--garbage-collect) (message \"%s\" 
(memory-report-object-size '(a b \"cd\"))))"
82


Not sure whether I'm using memory-report-object-size as intended but its 
initialization is definitely not doing anything since 
memory-report--type-size is initialized to a hash table in the same module.

Sergey
[0001-Fix-memory-report-object-size-to-initialize-memory-r.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53310; Package emacs. (Fri, 21 Jan 2022 11:43:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sergey Vinokurov <serg.foo <at> gmail.com>
Cc: 53310 <at> debbugs.gnu.org
Subject: Re: bug#53310: [PATCH] cannot use memory-report-object-size in
 pristine session
Date: Fri, 21 Jan 2022 12:42:45 +0100
Sergey Vinokurov <serg.foo <at> gmail.com> writes:

>     * lisp/emacs-lisp/memory-report.el (memory-report-object-size):
>       Fix initialization of memory-report--type-size.

Thanks; applied to Emacs 28.

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




bug marked as fixed in version 28.1, send any further explanations to 53310 <at> debbugs.gnu.org and Sergey Vinokurov <serg.foo <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 21 Jan 2022 11:44: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, 18 Feb 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 61 days ago.

Previous Next


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