From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml Date: Mon, 27 Sep 2010 11:07:20 +0200 Message-ID: <8762xrk113.fsf@gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285578735 3066 80.91.229.12 (27 Sep 2010 09:12:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Sep 2010 09:12:15 +0000 (UTC) Cc: 7113@debbugs.gnu.org, Ari Roponen To: Thomas Fitzsimmons Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 27 11:12:13 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P09km-0005hy-CK for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Sep 2010 11:12:08 +0200 Original-Received: from localhost ([127.0.0.1]:34684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P09kl-0005BM-Jl for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Sep 2010 05:12:07 -0400 Original-Received: from [140.186.70.92] (port=59548 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P09jw-0004ro-VN for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2010 05:11:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P09jv-0003dx-LA for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2010 05:11:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50297) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P09jv-0003dp-HA for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2010 05:11:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P09dt-00048V-Uz; Mon, 27 Sep 2010 05:05:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Sep 2010 09:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7113 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7113-submit@debbugs.gnu.org id=B7113.128557828215893 (code B ref 7113); Mon, 27 Sep 2010 09:05:01 +0000 Original-Received: (at 7113) by debbugs.gnu.org; 27 Sep 2010 09:04:42 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P09dZ-00048I-Kw for submit@debbugs.gnu.org; Mon, 27 Sep 2010 05:04:41 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23] helo=mail.gmx.net) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P09dW-00048D-9v for 7113@debbugs.gnu.org; Mon, 27 Sep 2010 05:04:39 -0400 Original-Received: (qmail invoked by alias); 27 Sep 2010 09:07:23 -0000 Original-Received: from p4FC19466.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [79.193.148.102] by mail.gmx.net (mp009) with SMTP; 27 Sep 2010 11:07:23 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18jf8QSZkEjYzs7BcnJL1jZzoLV0S5COXar02LFrs Khv2v/NfD8vD3D User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 27 Sep 2010 05:05:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40476 Archived-At: Thomas Fitzsimmons writes: >> The crash happens because DBUS uses fatal warnings. Setting the >> environment variable DBUS_FATAL_WARNINGS to 0 helps: >> >> DBUS_FATAL_WARNINGS=0 emacs -Q --eval "(require 'dbus)" --eval >> '(dbus-introspect-xml :session "org.freedesktop.DBus" "")' >> >> This way the warning message is still printed but Emacs doesn't crash. > > OK, that does improve the situation for me but it doesn't solve the > problem in general. By default an unsuspecting user developing D-Bus > Lisp code (e.g. in ielm) can easily crash their Emacs session. Is there > a way for the Emacs D-Bus bindings to disable fatal warnings and/or to > intercept their causes and report the errors? I've committed a patch to the emacs-23 branch, unsetting $DBUS_FATAL_WARNINGS during initialization: --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs-23/src/dbusbind.c.~100061~ 2010-09-27 10:41:33.251159798 +0200 --- /home/albinus/src/emacs-23/src/dbusbind.c 2010-09-27 10:41:33.315137500 +0200 *************** *** 2132,2137 **** --- 2132,2139 ---- Vdbus_debug = Qt; #else Vdbus_debug = Qnil; + /* We do not want to abort. */ + unsetenv ("DBUS_FATAL_WARNINGS"); #endif Fprovide (intern_c_string ("dbusbind"), Qnil); --8<---------------cut here---------------end--------------->8--- > Thomas Best regards, Michael.