From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "andrés ramírez" <rrandresf@gmail.com>
Cc: 14120@debbugs.gnu.org
Subject: bug#14120: invalid load-history in emacsen that CANNOT_DUMP
Date: Mon, 17 Feb 2020 12:46:14 -0500 [thread overview]
Message-ID: <jwveeutjelo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86zhdhi19t.fsf@gmail.com> ("andrés ramírez"'s message of "Mon, 17 Feb 2020 17:14:54 +0000")
> 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
It's called too often, that's not workable.
I was thinking of putting an assertion in there instead, maybe something
like the patch below.
> 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?
The problem is that the file name is the string that's not there :-(
But maybe showing us the complete `load-history` when the error (in
load-history-filename-element) is caught might give us enough of a hint
(by looking at the entries nearby to try and infer the order of
operations at the time the broken entry was added)?
Stefan
diff --git a/src/lread.c b/src/lread.c
index c124d5a1d8..7f5f1394c7 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1876,8 +1876,14 @@ build_load_history (Lisp_Object filename, bool entire)
front of load-history, the most-recently-loaded position. Also
do this if we didn't find an existing member for the file. */
if (entire || !foundit)
- Vload_history = Fcons (Fnreverse (Vcurrent_load_list),
- Vload_history);
+ {
+ Lisp_Object tem = Fnreverse (Vcurrent_load_list);
+ eassert (EQ (filename, Fcar (tem)));
+ Vload_history = Fcons (tem, Vload_history);
+ /* FIXME: There should be an unbind_to right after calling us which
+ should re-establish the previous value of Vcurrent_load_list. */
+ Vcurrent_load_list = Qt;
+ }
}
static void
next prev parent reply other threads:[~2020-02-17 17:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 22:47 bug#14120: invalid load-history in emacsen that CANNOT_DUMP BT Templeton
2013-04-03 18:29 ` Stefan Monnier
2019-09-06 0:09 ` Glenn Morris
2020-02-17 13:34 ` Andrés Ramírez
2020-02-17 15:09 ` Stefan Monnier
2020-02-17 17:14 ` andrés ramírez
2020-02-17 17:46 ` Stefan Monnier [this message]
2020-02-18 1:01 ` andrés ramírez
2020-02-18 1:34 ` andrés ramírez
2020-02-18 13:40 ` Stefan Monnier
2020-02-18 13:50 ` andrés ramírez
2020-02-16 20:55 ` bug#14120: [Robert Weiner] Emacs history selection non-string arguments causing failures for a long time Stefan Monnier
2020-02-17 1:52 ` Stefan Monnier
2020-02-17 2:22 ` Robert Weiner
2020-02-17 3:18 ` Glenn Morris
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwveeutjelo.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=14120@debbugs.gnu.org \
--cc=rrandresf@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).