all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Leonard Lausen <leonard@lausen.nl>
Cc: 37331-done@debbugs.gnu.org
Subject: bug#37331: 27.0.50; segfault when starting from pdump and using dbus
Date: Wed, 11 Sep 2019 10:21:39 -0700	[thread overview]
Message-ID: <b4b7587f-2898-8223-412f-a8ed270e6ff9@cs.ucla.edu> (raw)
In-Reply-To: <87zhjg150m.fsf@lausen.nl>

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

Thanks for reporting the problem. I reproduced it and installed the attached 
patch, which should fix it.

[-- Attachment #2: 0001-Reset-dbus-registered-buses-on-dump-load.patch --]
[-- Type: text/x-patch, Size: 1359 bytes --]

From cc4da5b17e9e9aa522a0bd77dc341cd14ec9ea43 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 11 Sep 2019 10:19:07 -0700
Subject: [PATCH] Reset dbus registered buses on dump load

Problem reported by Leonard Lausen (Bug#37331).
* src/dbusbind.c: Include pdumper.h.
(syms_of_dbusbind_for_pdumper):
New function, to reset the registered buses.
(syms_of_dbusbind): Use it, fixing a TODO.
---
 src/dbusbind.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/dbusbind.c b/src/dbusbind.c
index 7f4c8717f4..de67dc94f9 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -26,6 +26,7 @@
 #include "lisp.h"
 #include "termhooks.h"
 #include "keyboard.h"
+#include "pdumper.h"
 #include "process.h"
 
 #ifndef DBUS_NUM_MESSAGE_TYPES
@@ -1681,6 +1682,12 @@ init_dbusbind (void)
   xputenv ("DBUS_FATAL_WARNINGS=0");
 }
 
+static void
+syms_of_dbusbind_for_pdumper (void)
+{
+  xd_registered_buses = Qnil;
+}
+
 void
 syms_of_dbusbind (void)
 {
@@ -1829,13 +1836,10 @@ syms_of_dbusbind (void)
 #endif
 
   /* Initialize internal objects.  */
-  xd_registered_buses = Qnil;
+  pdumper_do_now_and_after_load (syms_of_dbusbind_for_pdumper);
   staticpro (&xd_registered_buses);
 
-  // TODO: reset buses on dump load
-
   Fprovide (intern_c_string ("dbusbind"), Qnil);
-
 }
 
 #endif /* HAVE_DBUS */
-- 
2.17.1


  reply	other threads:[~2019-09-11 17:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-07 15:48 bug#37331: 27.0.50; segfault when starting from pdump and using dbus Leonard Lausen
2019-09-11 17:21 ` Paul Eggert [this message]
2019-09-13  9:25   ` Leonard Lausen
2019-09-13 18:55     ` Paul Eggert
2019-09-14 20:12       ` Leonard Lausen
2021-10-11 14:28         ` Lars Ingebrigtsen
2021-10-11 16:00           ` Eli Zaretskii
2021-10-12 11:02             ` Lars Ingebrigtsen
2021-10-12 11:57               ` Lars Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4b7587f-2898-8223-412f-a8ed270e6ff9@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=37331-done@debbugs.gnu.org \
    --cc=leonard@lausen.nl \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.