Package: emacs;
Reported by: Joel Ray Holveck <joelh <at> piquan.org>
Date: Fri, 22 Apr 2016 03:48:01 UTC
Severity: normal
Tags: patch
Found in version 24.3
Fixed in version 25.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: help-debbugs <at> gnu.org (GNU bug Tracking System) To: Michael Albinus <michael.albinus <at> gmx.de> Cc: tracker <at> debbugs.gnu.org Subject: bug#23336: closed (24.3; dbus-register-signal misparses :argN arguments) Date: Tue, 26 Apr 2016 18:30:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 26 Apr 2016 20:29:47 +0200 with message-id <87twio9qas.fsf <at> gmx.de> and subject line Re: bug#23336: 24.3; dbus-register-signal misparses :argN arguments has caused the debbugs.gnu.org bug report #23336, regarding 24.3; dbus-register-signal misparses :argN arguments to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs <at> gnu.org.) -- 23336: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23336 GNU Bug Tracking System Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Joel Ray Holveck <joelh <at> piquan.org> To: bug-gnu-emacs <at> gnu.org Subject: 24.3; dbus-register-signal misparses :argN arguments Date: Thu, 21 Apr 2016 20:39:04 -0700The following expression raises an error of type "wrong-type-argument": (dbus-register-signal :system "com.ubuntu.Upstart" "/com/ubuntu/Upstart/jobs/network_2dinterface" "com.ubuntu.Upstart0_6.Job" "InstanceAdded" 'rwv-handle-intf-up :arg0 "/com/ubuntu/Upstart/jobs/network_2dinterface/cscotun0") (Note that this particular call is incorrect for reasons dealing with the Upstart API, but that is irrelevant to this bug.) If you evaluate the defun for dbus-register-signal (instead of using the .elc's compiled version) and then evaluate that expression, you can easily see where the problem is: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "0") <=("0" 63) (and (<= counter 63) (stringp value)) This happens on line 647 of dbus.el. You can see that counter was set on line 644 to a string, but then is compared against an integer. As a workaround, it's possible to use the backward-compatibility no-keywords style for :argN options, but not for :pathN options. The following patch fixes the issue: --- dbus.el.~1~ 2016-04-21 20:28:14.373278122 -0700 +++ dbus.el 2016-04-21 20:28:23.877255431 -0700 @@ -641,7 +641,8 @@ (string-match "^:\\(arg\\|path\\)\\([[:digit:]]+\\)$" (symbol-name key))) - (setq counter (match-string 2 (symbol-name key)) + (setq counter (string-to-number + (match-string 2 (symbol-name key))) args (cdr args) value (car args)) (unless (and (<= counter 63) (stringp value)) In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2014-03-07 on lamiak, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.4 LTS Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' '--without-gconf' '--without-gsettings' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: eldoc-mode: t minibuffer-electric-default-mode: t mail-abbrevs-mode: t iswitchb-mode: t desktop-save-mode: t savehist-mode: t which-function-mode: t auto-insert-mode: t show-paren-mode: t display-time-mode: t recentf-mode: t msb-mode: t shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: DBus-Event (dbus-event :system 2 260 org.freedesktop.DBus nil nil nil dbus-call-method-handler :1.0) [3 times] Fdbus_message_internal: DBUS_MESSAGE_TYPE_METHOD_CALL :system org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus AddMatch dbus-call-method-handler Fdbus_message_internal: Parameter3 type='signal',sender=':1.0',interface='com.ubuntu.Upstart0_6.Job',member='InstanceAdded',path='/com/ubuntu/Upstart/jobs/network_2dinterface',arg0='/com/ubuntu/Upstart/jobs/network_2dinterface/cscotun0' xd_signature: s xd_append_arg: s type='signal',sender=':1.0',interface='com.ubuntu.Upstart0_6.Job',member='InstanceAdded',path='/com/ubuntu/Upstart/jobs/network_2dinterface',arg0='/com/ubuntu/Upstart/jobs/network_2dinterface/cscotun0' Fdbus_message_internal: Message sent: (:serial :system 261) xd_read_message_1: Event received: DBUS_MESSAGE_TYPE_METHOD_RETURN 261 org.freedesktop.DBus (null) (null) (null) nil xd_read_message_1: Event stored: (:system 2 261 org.freedesktop.DBus nil nil nil dbus-call-method-handler) DBus-Event (dbus-event :system 2 261 org.freedesktop.DBus nil nil nil dbus-call-method-handler) [3 times] Matching rule "type='signal',sender=':1.0',interface='com.ubuntu.Upstart0_6.Job',member='InstanceAdded',path='/com/ubuntu/Upstart/jobs/network_2dinterface',arg0='/com/ubuntu/Upstart/jobs/network_2dinterface/cscotun0'" created Load-path shadows: ~/src/elisp/loaddefs hides ~/share/emacs/site-lisp/loaddefs /usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode ~/src/elisp/loaddefs hides /usr/share/emacs/24.3/lisp/loaddefs /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.3/lisp/textmodes/rst /usr/share/emacs24/site-lisp/prolog-el/prolog hides /usr/share/emacs/24.3/lisp/progmodes/prolog Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils hippie-exp edebug dbus xml debug info org-taskjuggler org-odt org-lparse org-latex org-export-latex org-beamer org-icalendar org-docbook footnote org-ascii cus-edit nroff-mode help-mode org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb grep dired-aux dired-x dired misearch multi-isearch add-log semantic/imenu semantic/sb semantic/db-file data-debug cedet-files vc-git semantic/wisent/python semantic/decorate/include semantic/decorate/mode semantic/decorate pulse semantic/dep semantic/wisent/python-wy semantic/wisent semantic/wisent/wisent python rx eldoc jka-compr minibuf-eldef mailabbrev iswitchb icomplete desktop cus-start cus-load savehist vcursor disp-table org-protocol org ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs find-func cal-menu calendar cal-loaddefs derived which-func imenu autoinsert cl-macs avoid paren time festival server cl tramp-cache tramp-sh recentf tree-widget msb tramp tramp-compat auth-source gnus-util mm-util mail-prsvr password-cache tramp-loaddefs shell pcomplete format-spec uniquify printing ps-print ps-def lpr midnight slime-autoloads pylint haskell-mode-autoloads ecb warnings edmacro kmacro ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic ecb-file-browser ecb-speedbar ecb-layout compile comint ansi-color ecb-create-layout advice help-fns cl-lib advice-preload ecb-compilation ecb-common-browser assoc speedbar sb-image dframe ecb-navigate ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-mode semantic/db-find semantic/db-ref semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db gv eieio-base semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt semantic/util-modes easymenu semantic/util semantic semantic/tag semantic/lex semantic/fw eieio byte-opt bytecomp byte-compile cconv mode-local cedet wid-edit ecb-util ring thingatpt devhelp time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting font-render-setting x-toolkit x multi-tty emacs)
[Message part 3 (message/rfc822, inline)]
From: Michael Albinus <michael.albinus <at> gmx.de> To: Joel Ray Holveck <joelh <at> piquan.org> Cc: 23336-done <at> debbugs.gnu.org Subject: Re: bug#23336: 24.3; dbus-register-signal misparses :argN arguments Date: Tue, 26 Apr 2016 20:29:47 +0200Version: 25.1 Joel Ray Holveck <joelh <at> piquan.org> writes: Hi Joel, > The following expression raises an error of type "wrong-type-argument": > > (dbus-register-signal :system "com.ubuntu.Upstart" > "/com/ubuntu/Upstart/jobs/network_2dinterface" > "com.ubuntu.Upstart0_6.Job" "InstanceAdded" 'rwv-handle-intf-up :arg0 > "/com/ubuntu/Upstart/jobs/network_2dinterface/cscotun0") Thank you for this bug report. It looks like the problem has been fixed already last year with the following commit: --8<---------------cut here---------------start------------->8--- commit b206b9d73728dec9b71a41ac4e1622ec795d6fd0 Author: Daiki Ueno <ueno <at> gnu.org> Date: Thu Feb 26 11:01:10 2015 +0900 dbus.el: fix ":argN" keyword recognition * net/dbus.el (dbus-register-signal): Convert "N" of ":argN" to integer before comparison. --8<---------------cut here---------------end--------------->8--- I've checked with the pretest version of Emacs 25.1, and your example does not show any error indeed. So I'm closing this bug report for Emacs 25.1. Best regards, Michael.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.