From: "Nicolas Bértolo" <nicolasbertolo@gmail.com>
To: 41754@debbugs.gnu.org
Subject: bug#41754: [feature/native-comp] Fix crash when loading lambdas from dumps with --enable-checking.
Date: Sun, 7 Jun 2020 16:48:16 -0300 [thread overview]
Message-ID: <CAFnS-OkLBp35-ZK4bHWrCM6p_sppN7AaqMpyrRq0677jPyOxcA@mail.gmail.com> (raw)
In-Reply-To: <CAFnS-On8NdeYFPzX=A9oT1HmfHGODUhtMHHuUZWa38Re6NR8_g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 26 bytes --]
Oops,
Here it is.
Nico.
[-- Attachment #2: 0001-Don-t-crash-when-a-lambda-has-been-already-loaded.patch --]
[-- Type: application/octet-stream, Size: 1003 bytes --]
From 343511d91eac3e85f57803fca821632858bb9ba9 Mon Sep 17 00:00:00 2001
From: Nicolas Bertolo <nicolasbertolo@gmail.com>
Date: Sun, 7 Jun 2020 14:40:14 -0300
Subject: [PATCH] Don't crash when a lambda has been already loaded.
* src/pdumper.c (dump_do_dump_relocation): Skip lambdas that have been
loaded already.
---
src/pdumper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pdumper.c b/src/pdumper.c
index 92ac96a8faa..594b60b143b 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5365,6 +5365,10 @@ dump_do_dump_relocation (const uintptr_t dump_base,
XSETSUBR (tem, subr);
Lisp_Object *fixup =
&(comp_u->data_imp_relocs[XFIXNUM (lambda_data_idx)]);
+ bool lambda_already_loaded = SUBRP (*fixup)
+ && XSUBR (*fixup)->function.a0 == func;
+ if (lambda_already_loaded)
+ return;
eassert (EQ (*fixup, Qlambda_fixup));
*fixup = tem;
Fputhash (tem, Qnil, comp_u->lambda_gc_guard);
--
2.25.1.windows.1
next prev parent reply other threads:[~2020-06-07 19:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-07 19:08 bug#41754: [feature/native-comp] Fix crash when loading lambdas from dumps with --enable-checking Nicolas Bértolo
2020-06-07 19:28 ` Andrea Corallo
2020-06-07 19:48 ` Nicolas Bértolo [this message]
2020-06-08 15:42 ` Andrea Corallo
2020-06-08 21:30 ` Andrea Corallo
2020-06-09 11:54 ` Nicolas Bértolo
2020-06-09 14:07 ` Andrea Corallo
2020-06-09 14:30 ` Nicolas Bértolo
2020-06-09 15:02 ` Eli Zaretskii
2020-06-09 15:11 ` Nicolas Bértolo
2020-06-09 15:53 ` Eli Zaretskii
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=CAFnS-OkLBp35-ZK4bHWrCM6p_sppN7AaqMpyrRq0677jPyOxcA@mail.gmail.com \
--to=nicolasbertolo@gmail.com \
--cc=41754@debbugs.gnu.org \
/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).