From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#37331: 27.0.50; segfault when starting from pdump and using dbus Date: Wed, 11 Sep 2019 10:21:39 -0700 Organization: UCLA Computer Science Department Message-ID: References: <87zhjg150m.fsf@lausen.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6CEF08ACDE0405D75F1BD00C" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="67925"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cc: 37331-done@debbugs.gnu.org To: Leonard Lausen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 11 19:22:22 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i86Jy-000HYB-Ht for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Sep 2019 19:22:22 +0200 Original-Received: from localhost ([::1]:54072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i86Jx-0000wS-3d for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Sep 2019 13:22:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49414) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i86Ji-0000vR-M0 for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2019 13:22:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i86Jg-00030I-CS for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2019 13:22:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33881) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i86Je-0002zf-NV for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2019 13:22:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i86Je-0003FK-Ft for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2019 13:22:02 -0400 In-Reply-To: <87zhjg150m.fsf@lausen.nl> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Sep 2019 17:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 37331 X-GNU-PR-Package: emacs Mail-Followup-To: 37331@debbugs.gnu.org, eggert@cs.ucla.edu, leonard@lausen.nl Original-Received: via spool by 37331-done@debbugs.gnu.org id=D37331.156822250912452 (code D ref 37331); Wed, 11 Sep 2019 17:22:02 +0000 Original-Received: (at 37331-done) by debbugs.gnu.org; 11 Sep 2019 17:21:49 +0000 Original-Received: from localhost ([127.0.0.1]:42702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i86JR-0003Em-5d for submit@debbugs.gnu.org; Wed, 11 Sep 2019 13:21:49 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i86JO-0003EZ-IE for 37331-done@debbugs.gnu.org; Wed, 11 Sep 2019 13:21:47 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7B4761601EE; Wed, 11 Sep 2019 10:21:40 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id n0c7sYfXDdli; Wed, 11 Sep 2019 10:21:39 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B369116021D; Wed, 11 Sep 2019 10:21:39 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CTzkUtDIQOHl; Wed, 11 Sep 2019 10:21:39 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8C2001601EE; Wed, 11 Sep 2019 10:21:39 -0700 (PDT) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166360 Archived-At: This is a multi-part message in MIME format. --------------6CEF08ACDE0405D75F1BD00C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for reporting the problem. I reproduced it and installed the attached patch, which should fix it. --------------6CEF08ACDE0405D75F1BD00C Content-Type: text/x-patch; name="0001-Reset-dbus-registered-buses-on-dump-load.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Reset-dbus-registered-buses-on-dump-load.patch" >From cc4da5b17e9e9aa522a0bd77dc341cd14ec9ea43 Mon Sep 17 00:00:00 2001 From: Paul Eggert 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 --------------6CEF08ACDE0405D75F1BD00C--