GNU bug report logs - #14120
invalid load-history in emacsen that CANNOT_DUMP

Previous Next

Package: emacs;

Reported by: BT Templeton <bt <at> hcoop.net>

Date: Mon, 1 Apr 2013 22:55:01 UTC

Severity: normal

Found in version 27.0.50

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: andrés ramírez <rrandresf <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 14120 <at> debbugs.gnu.org
Subject: Re: bug#14120: invalid load-history in emacsen that CANNOT_DUMP
Date: Mon, 17 Feb 2020 17:14:54 +0000
Hi Stefan.

Stefan> Any chance you can try and investigate where/why/how that
Stefan> spurious value gets pushed to `load-history`?

Yes. I am going to try.

Stefan> AFAICT the only place where `load-history` gets modified is in
Stefan> lread.c:build_load_history.  Could you add some assertions
Stefan> there to try and catch the sucker?

I was aware of that. At that moment. I pointed to lread.c also. But this
seems too happen during startup (reading the dot emacs setup).

I am going to list what I would need to do for reaching the goal:
1. Recompile Emacs23 (for enabling debugging-symbols)
2.  Put a breakpoint on lread.c:build_load_history and watch how
many times it is called and with wich params. It seems a very long list
of params

3. After it. I suppose I should start emacs23 -Q  and try lo call one by
one lread.c:build_load_history with those params. And after every
function invocation I would need to check if that symbol(the spurious
one that corrupts the list) have got inside the
loads-history-list.

An idea: As I have a running emacs23 session right now.
--8<---------------cut here---------------start------------->8---
      (defun load-history-filename-element (file-regexp)
        "Get the first elt of `load-history' whose car matches FILE-REGEXP.
Return nil if there isn't one.
NOTE2ME: upd stringp condition cos of error on tramp"
        (let* ((loads load-history)
               (load-elt (and loads (car loads))))
          (save-match-data
            (while (and loads
                        (or (null (and (car load-elt) (stringp (car load-elt))))
                            (not (string-match file-regexp (car load-elt)))))
              (setq loads (cdr loads)
                    load-elt (and loads (car loads)))))
          load-elt))
 --8<---------------cut here---------------end--------------->8---

The function above could be modified for removing the stringp
validation. And every time load-history-filename-element is called when
an error happens that function show me the file on the history to which the spurious
symbol belongs to?

What Do You think?

AR




This bug report was last modified 5 years and 152 days ago.

Previous Next


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