bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml


From: Thomas Fitzsimmons
Subject: bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
Date: Mon, 27 Sep 2010 02:51:59 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Michael Albinus <address@hidden> writes:

> Thomas Fitzsimmons <address@hidden> 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:
>
> *** /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);
>
>> Thomas
>
> Best regards, Michael.

Hmm, DBUS_FATAL_WARNINGS is unset when I replicate the crash.

Looking at dbus-internals.c from D-Bus 1.2.24, don't you want to set
DBUS_FATAL_WARNINGS explicitly to 0 so that
fatal_warnings_on_check_failed is FALSE?

Thomas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]