GNU bug report logs -
#58865
29.0.50; Warnings when compiling net/dbus.el
Previous Next
Reported by: Arash Esbati <arash <at> gnu.org>
Date: Sat, 29 Oct 2022 12:03:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58865 in the body.
You can then email your comments to 58865 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58865
; Package
emacs
.
(Sat, 29 Oct 2022 12:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Arash Esbati <arash <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 29 Oct 2022 12:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi all,
building Emacs from master (f826f56a41) issues this warning:
In dbus-register-signal:
net/dbus.el:842:16: Warning: reference to free variable `dbus-debug'
In dbus-check-event:
net/dbus.el:1073:9: Warning: reference to free variable `dbus-debug'
In dbus-handle-event:
net/dbus.el:1160:47: Warning: reference to free variable `dbus-debug'
net/dbus.el:1283:9: Warning: Variable `dbus-debug' left uninitialized
net/dbus.el:1295:9: Warning: Variable `dbus-debug' left uninitialized
net/dbus.el:1311:9: Warning: Variable `dbus-debug' left uninitialized
net/dbus.el:1320:9: Warning: Variable `dbus-debug' left uninitialized
net/dbus.el:1394:9: Warning: Variable `dbus-debug' left uninitialized
net/dbus.el:1631:9: Warning: Variable `dbus-debug' left uninitialized
net/dbus.el:1891:18: Warning: Variable `dbus-debug' left uninitialized
ELC net/dns.elc
In dbus-register-monitor:
net/dbus.el:2032:11: Warning: reference to free variable `dbus-debug'
In dbus--init:
net/dbus.el:2255:8: Warning: reference to free variable `dbus-debug'
Best, Arash
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58865
; Package
emacs
.
(Sat, 29 Oct 2022 15:05:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 58865 <at> debbugs.gnu.org (full text, mbox):
Arash Esbati <arash <at> gnu.org> writes:
> Hi all,
Hi Arash,
> building Emacs from master (f826f56a41) issues this warning:
>
> In dbus-register-signal:
> net/dbus.el:842:16: Warning: reference to free variable `dbus-debug'
>
> In dbus-check-event:
> net/dbus.el:1073:9: Warning: reference to free variable `dbus-debug'
>
> In dbus-handle-event:
> net/dbus.el:1160:47: Warning: reference to free variable `dbus-debug'
> net/dbus.el:1283:9: Warning: Variable `dbus-debug' left uninitialized
> net/dbus.el:1295:9: Warning: Variable `dbus-debug' left uninitialized
> net/dbus.el:1311:9: Warning: Variable `dbus-debug' left uninitialized
> net/dbus.el:1320:9: Warning: Variable `dbus-debug' left uninitialized
> net/dbus.el:1394:9: Warning: Variable `dbus-debug' left uninitialized
> net/dbus.el:1631:9: Warning: Variable `dbus-debug' left uninitialized
> net/dbus.el:1891:18: Warning: Variable `dbus-debug' left uninitialized
> ELC net/dns.elc
>
> In dbus-register-monitor:
> net/dbus.el:2032:11: Warning: reference to free variable `dbus-debug'
>
> In dbus--init:
> net/dbus.el:2255:8: Warning: reference to free variable `dbus-debug'
Doesn't happen here. Is it reproducible with "make bootstrap"?
> Best, Arash
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58865
; Package
emacs
.
(Sat, 29 Oct 2022 21:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 58865 <at> debbugs.gnu.org (full text, mbox):
Hi Michael,
Michael Albinus <michael.albinus <at> gmx.de> writes:
> Doesn't happen here. Is it reproducible with "make bootstrap"?
I build Emacs with a script which does:
git clean -fdx --exclude=ChangeLog
./autogen.sh
...
So my local repo is in a clean state when the compilation starts. I
tried 'make bootstrap' and the issue remains.
Best, Arash
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58865
; Package
emacs
.
(Mon, 31 Oct 2022 15:59:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 58865 <at> debbugs.gnu.org (full text, mbox):
Arash Esbati <arash <at> gnu.org> writes:
> Hi Michael,
Hi Arash,
>> Doesn't happen here. Is it reproducible with "make bootstrap"?
>
> I build Emacs with a script which does:
>
> git clean -fdx --exclude=ChangeLog
> ./autogen.sh
> ...
>
> So my local repo is in a clean state when the compilation starts. I
> tried 'make bootstrap' and the issue remains.
In the future, please report bugs via `report-emacs-bug'. This gives
useful information.
You appear to have configured Emacs --without-dbus, which would have
been seen when using the bug submit function. Using this configure
option I can reproduce the bug.
However, dbus.el is prepared to care this situation. It contains the code
--8<---------------cut here---------------start------------->8---
;; The following symbols are defined in dbusbind.c. We need them also
;; when Emacs is compiled without D-Bus support.
(unless (boundp 'dbus-error)
(define-error 'dbus-error "D-Bus error"))
(unless (boundp 'dbus-debug)
(defvar dbus-debug nil))
--8<---------------cut here---------------end--------------->8---
This has worked fine until recently. According to git bisect, the
following commit has broken this:
--8<---------------cut here---------------start------------->8---
1b1ffe07897ebe06cf96ab423fad3cde9fd6c981 is the first bad commit
commit 1b1ffe07897ebe06cf96ab423fad3cde9fd6c981
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Mon Oct 17 17:11:40 2022 -0400
(Ffunction): Make interpreted closures safe for space
--8<---------------cut here---------------end--------------->8---
Stefan, could you pls have a look on this?
> Best, Arash
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58865
; Package
emacs
.
(Mon, 31 Oct 2022 17:59:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 58865 <at> debbugs.gnu.org (full text, mbox):
> Cc: 58865 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Date: Mon, 31 Oct 2022 16:58:07 +0100
>
> In the future, please report bugs via `report-emacs-bug'. This gives
> useful information.
Hear, hear! For some reasons, veteran contributors and users of Emacs
neglect to use report-emacs-bug, which many times makes the triage and
the analysis of the issue harder and more time consuming, let alone
error-prone.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58865
; Package
emacs
.
(Mon, 31 Oct 2022 20:34:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 58865 <at> debbugs.gnu.org (full text, mbox):
> However, dbus.el is prepared to care this situation. It contains the code
>
> --8<---------------cut here---------------start------------->8---
> ;; The following symbols are defined in dbusbind.c. We need them also
> ;; when Emacs is compiled without D-Bus support.
> (unless (boundp 'dbus-error)
> (define-error 'dbus-error "D-Bus error"))
>
> (unless (boundp 'dbus-debug)
> (defvar dbus-debug nil))
> --8<---------------cut here---------------end--------------->8---
Hmm... this will define `dbus-debug` as a dynamically scoped variable
when `dbus.el(c)` is *loaded* but not while compiling this file, so the
compilation *should* arguably emit those warnings (and those relating
the the places where we let-bind this var reflect real bugs because
we'll miscompile those bindings as if they were using static scoping).
So I think the code requires a top-level (defvar dbus-debug).
> This has worked fine until recently. According to git bisect, the
> following commit has broken this:
>
> --8<---------------cut here---------------start------------->8---
> 1b1ffe07897ebe06cf96ab423fad3cde9fd6c981 is the first bad commit
I wonder why we didn't get warnings before that commit (and why this
commit makes a difference).
...
Oh, I see. The patch changed a bit how dynvars are recognized which
fixed some cases where `defvar`s "leaked" outside of their context.
The previous leak, in the present case, caused the `(defvar dbus-debug
nil)` to mark that var as dyn-bound in the whole file rather than only
within the `unless` where it appears.
Admittedly, in this case it was the right call :-)
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#58865
; Package
emacs
.
(Tue, 01 Nov 2022 11:59:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 58865 <at> debbugs.gnu.org (full text, mbox):
Hi Michael,
Michael Albinus <michael.albinus <at> gmx.de> writes:
> In the future, please report bugs via `report-emacs-bug'. This gives
> useful information.
>
> You appear to have configured Emacs --without-dbus, which would have
> been seen when using the bug submit function. Using this configure
> option I can reproduce the bug.
To be honest, building Emacs worked fine without warnings from Tramp for
such a long time that I thought I'm reporting something easy to fix
(like my other report #58864 about hierarchy.el), so I even missed to
say that I'm building Emacs on Windows 10; and that would have been the
hint for '--without-dbus'. At any rate, sorry for not being precise in
the first place; I'll consider `report-emacs-bug' in future.
Best, Arash
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Tue, 01 Nov 2022 15:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Arash Esbati <arash <at> gnu.org>
:
bug acknowledged by developer.
(Tue, 01 Nov 2022 15:41:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 58865-done <at> debbugs.gnu.org (full text, mbox):
Version: 29.1
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
Hi Stefan,
> So I think the code requires a top-level (defvar dbus-debug).
Done, pushed to master. I'm closing the bug.
And thanks for the explanation!
> Stefan
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 30 Nov 2022 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.