From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "John Wiegley" Newsgroups: gmane.emacs.bugs Subject: bug#29450: 26.0.90; No check for nil in some filenotify functions Date: Sat, 25 Nov 2017 22:18:07 -0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1511677155 990 195.159.176.226 (26 Nov 2017 06:19:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Nov 2017 06:19:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) To: 29450@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 26 07:19:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIqHW-0007q7-3H for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 07:19:10 +0100 Original-Received: from localhost ([::1]:55395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIqHW-0005bP-SK for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 01:19:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIqHR-0005a6-Bw for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 01:19:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIqHO-00033l-7Y for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 01:19:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIqHO-00033a-2f for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 01:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eIqHN-0001OP-Su for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 01:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "John Wiegley" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Nov 2017 06:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29450 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15116771085307 (code B ref -1); Sun, 26 Nov 2017 06:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Nov 2017 06:18:28 +0000 Original-Received: from localhost ([127.0.0.1]:58482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIqGq-0001NX-19 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 01:18:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIqGn-0001NK-Vr for submit@debbugs.gnu.org; Sun, 26 Nov 2017 01:18:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIqGh-0002Op-Lz for submit@debbugs.gnu.org; Sun, 26 Nov 2017 01:18:20 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eIqGh-0002Og-Ih for submit@debbugs.gnu.org; Sun, 26 Nov 2017 01:18:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIqGg-0005ZV-HO for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 01:18:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIqGd-0002Ky-Dh for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 01:18:18 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIqGd-0002Kl-AE; Sun, 26 Nov 2017 01:18:15 -0500 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:41929) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eIqGc-00032b-Ux; Sun, 26 Nov 2017 01:18:15 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 355A020BF0; Sun, 26 Nov 2017 01:18:14 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 26 Nov 2017 01:18:14 -0500 X-ME-Sender: Original-Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id 9835B240B2; Sun, 26 Nov 2017 01:18:13 -0500 (EST) Mail-Followup-To: bug-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: 208.118.235.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:140399 Archived-At: The documentation for find-file-name-handler says: find-file-name-handler is a built-in function in =E2=80=98C source code= =E2=80=99. =20=20=20=20 (find-file-name-handler FILENAME OPERATION) =20=20=20=20 Return FILENAME=E2=80=99s handler function for OPERATION, if it has one. Otherwise, return nil. However, several of the functions in filenotify use the return value of this function without checking if it's nil or not: (defun file-notify-rm-watch (descriptor) "Remove an existing watch specified by its DESCRIPTOR. DESCRIPTOR should be an object returned by `file-notify-add-watch'." (when-let* ((watch (gethash descriptor file-notify-descriptors))) (let ((handler (find-file-name-handler (file-notify--watch-directory watch) 'file-notify-rm-watch))) (condition-case nil (if handler ;; A file name handler could exist even if there is no ;; local file notification support. (funcall handler 'file-notify-rm-watch descriptor) I've been getting several errors with a backtrace like nil(48). This is lik= ely because some package has done something wrong, but even still, filenotify should be more defensive. --=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2