unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Unexec dumping results in "Segmentation fault" on Windows Msys2
Date: Sun, 2 May 2021 12:43:16 +0300	[thread overview]
Message-ID: <745a8ca2-662e-4f1d-5da8-d34b87af3845@gmail.com> (raw)
In-Reply-To: <834kfoc8vu.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

Thank you. It finally works.

While testing I had another problem related to pdumper stuff getting 
used without being defined. So I wrote a trivial patch for it. But then 
I retested with a clean bootstrap and learned that it normally only 
gives a warning for it:

make[2]: Entering directory '/d/Emacs/configurations/master-unexec/lisp'
   ELC      /d/Emacs/source/repo/lisp/emacs-lisp/bytecomp.elc

In end of data:
D:/Emacs/source/repo/lisp/emacs-lisp/bytecomp.el:5314:39: Warning: the
     function `pdumper-stats' is not known to be defined.

Anyway, I've attached that patch, feel free to apply or not apply it as 
you see fit, since it only removes that one warning, and since unexec is 
deprecated anyway...


[-- Attachment #2: 0001-Don-t-use-pdumper-stats-with-unexec.patch --]
[-- Type: text/plain, Size: 1160 bytes --]

From 9abf8228f55894d62621edc1e5467467e667e1bc Mon Sep 17 00:00:00 2001
From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
Date: Sat, 1 May 2021 15:27:21 +0300
Subject: [PATCH] Don't use pdumper-stats with unexec

* lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded): Check if
pdumper-stats is bound before using it.
---
 lisp/emacs-lisp/bytecomp.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 9be54ca4f5..e93cee9924 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5311,7 +5311,8 @@ byte-compile-refresh-preloaded
   "Reload any Lisp file that was changed since Emacs was dumped.
 Use with caution."
   (let* ((argv0 (car command-line-args))
-         (emacs-file (or (cdr (nth 2 (pdumper-stats)))
+         (emacs-file (or (and (fboundp 'pdumper-stats)
+                              (cdr (nth 2 (pdumper-stats))))
                          (executable-find argv0))))
     (if (not (and emacs-file (file-exists-p emacs-file)))
         (message "Can't find %s to refresh preloaded Lisp files" argv0)
-- 
2.31.1.windows.1


  reply	other threads:[~2021-05-02  9:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03 20:20 Unexec dumping results in "Segmentation fault" on Windows Msys2 Nikolay Kudryavtsev
2021-04-04  7:11 ` Eli Zaretskii
2021-04-04  7:55   ` Eli Zaretskii
2021-04-04  8:41   ` Nikolay Kudryavtsev
2021-04-04 11:34     ` Eli Zaretskii
2021-04-14 22:11       ` Nikolay Kudryavtsev
2021-04-15  6:49         ` Eli Zaretskii
2021-04-15 13:07           ` Camm Maguire
2021-04-15 13:49             ` Eli Zaretskii
2021-04-15 15:47           ` Nikolay Kudryavtsev
2021-04-15 16:08             ` Eli Zaretskii
2021-04-15 19:17               ` Nikolay Kudryavtsev
2021-04-15 19:59                 ` Eli Zaretskii
2021-04-16 16:57                   ` Nikolay Kudryavtsev
2021-04-16 19:41                     ` Eli Zaretskii
2021-04-21 16:33                       ` Nikolay Kudryavtsev
2021-04-21 17:41                         ` Eli Zaretskii
2021-04-21 18:19                           ` Nikolay Kudryavtsev
2021-04-22 14:25                             ` Eli Zaretskii
2021-04-29 19:17                               ` Nikolay Kudryavtsev
2021-04-30 11:24                                 ` Eli Zaretskii
2021-05-02  9:43                                   ` Nikolay Kudryavtsev [this message]
2021-05-02 10:17                                     ` Eli Zaretskii
2021-04-22 17:22                           ` Eli Zaretskii
2021-04-22 18:59                             ` Nikolay Kudryavtsev
2021-04-22 19:13                               ` Eli Zaretskii
2021-04-22 19:26                                 ` Nikolay Kudryavtsev
2021-04-16  7:45                 ` Eli Zaretskii
2021-04-15 16:12             ` Eli Zaretskii
2021-04-15 19:45               ` Nikolay Kudryavtsev

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=745a8ca2-662e-4f1d-5da8-d34b87af3845@gmail.com \
    --to=nikolay.kudryavtsev@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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).