From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p Date: Sat, 06 Jul 2019 09:27:22 -0400 Message-ID: <87muhr47k5.fsf@gmail.com> References: <7fa570d6-74a7-56d0-af9e-48ade20551b8@cornell.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="201712"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) Cc: 36502@debbugs.gnu.org To: Daniel Sutton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 06 15:28:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjkjb-000qMD-AQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jul 2019 15:28:11 +0200 Original-Received: from localhost ([::1]:59606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjkja-0001BB-BM for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jul 2019 09:28:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54517) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjkjU-00018K-Fl for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 09:28:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjkjT-0000jO-D1 for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 09:28:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45582) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjkjT-0000j7-6o for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 09:28:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjkjT-0006mJ-2P for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 09:28:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jul 2019 13:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36502 X-GNU-PR-Package: emacs Original-Received: via spool by 36502-submit@debbugs.gnu.org id=B36502.156241965125992 (code B ref 36502); Sat, 06 Jul 2019 13:28:03 +0000 Original-Received: (at 36502) by debbugs.gnu.org; 6 Jul 2019 13:27:31 +0000 Original-Received: from localhost ([127.0.0.1]:54398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjkix-0006lA-9k for submit@debbugs.gnu.org; Sat, 06 Jul 2019 09:27:31 -0400 Original-Received: from mail-io1-f53.google.com ([209.85.166.53]:35483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjkiv-0006kx-0n for 36502@debbugs.gnu.org; Sat, 06 Jul 2019 09:27:29 -0400 Original-Received: by mail-io1-f53.google.com with SMTP id m24so15465738ioo.2 for <36502@debbugs.gnu.org>; Sat, 06 Jul 2019 06:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=OHWtipMRsyVAnK8LC787MRPN8hHiSbvgMMQheQvxw6w=; b=FP0oJOdvlqVDZ1w9pWMXsso4IDozo0G73L9evj6p1vPxDMgwVGTX1/pIEXTFtEDrDQ qPY36A0QXbWOCwxWJTy+jzv8RYD1BqXV5a5zGkdwUNH7XHW53LCJasBFUKHgd9zI65/Z OXM/y+DY5GiUojKCbS31GtZ00QEaKNh1dUQoyQPtdm/+jlUOls5zj2627n3VfWnPbBOv EWOfNS27/yNNEQRQFGqiMqJ3D4Rd+0Q8rlwZC3sFWWdJ3WEwwTETr0hSuMyt8vi7OU/Z qwra2CFXnVNyzu/x3kdSrjq+tbJGdEOPkbkyqsh9Ja2jkz2C2I7VVzkgx++vF2h66l4q FSOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=OHWtipMRsyVAnK8LC787MRPN8hHiSbvgMMQheQvxw6w=; b=evO5V7b2SBh37iTuNBpzSpn6czbQnDu2p2W8kLdJ1a6+3x6G9lDZpg763eTycLZGhB 8PHZY+1DfyhlDpfudSYMRUqUWNS1cfUZ6wz1DxT/PjIZS9FOq4n81d5iGeptwW6Bld3a BqO7GoKsyGpDTrxgKZDszz8SAnmE5cQKWXz5haI7gvCCdihGpG+kyQuIiqZJS8rIH5Hm hd6u0ZTp+TN00Rp6hwJfxx0Y53IBze61xDpfvsfFIgtgVn1ZDOmSkrG/mZjC1DNJCAf5 ixsUfAgP4p6WpqB7YdEZ18BfO+xJLokOK9lhtAg214JGfCDa05OuI8e9gXQ3a73Kxh75 4dCw== X-Gm-Message-State: APjAAAWWSUp9dVIqeiN9MyOXROXweyE/qbvnXsUMysFzXHAWeTPQrRla SPonZsNu2ISnk5ieKoZCX/Q= X-Google-Smtp-Source: APXvYqyN0/3UwcliTg51IIP6tYqjKTJ+QV7vGMtG4qyIHIx47NbYO4VqV6Gxt4iQDWBY7QbAdHzxuA== X-Received: by 2002:a6b:7017:: with SMTP id l23mr8985830ioc.159.1562419643395; Sat, 06 Jul 2019 06:27:23 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id p3sm2617369iom.7.2019.07.06.06.27.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Jul 2019 06:27:22 -0700 (PDT) In-Reply-To: (Daniel Sutton's message of "Thu, 4 Jul 2019 22:05:59 -0500") 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: 209.51.188.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:162217 Archived-At: Daniel Sutton writes: > So the "bug" can be reproduced by the following, which was the important > bits of the test: > > (let ((default-directory "made/up/project/location")) > (file-name-case-insensitive-p default-directory)) > > * note this will freeze your emacs > > I believe your change caused the behavior here but it seems like a > reasonable change and CIDER is definitely not honoring the assumptions in > `default-directory`. >> From: Ken Brown > >> On 7/4/2019 11:05 PM, Daniel Sutton wrote: >> > Sorry for the noise and thanks for your help > >> No problem. I'm glad you solved it. > >> Closing. Wouldn't it be better not to infloop in this case though? E.g., --- i/src/fileio.c +++ w/src/fileio.c @@ -2408,7 +2408,10 @@ DEFUN ("file-name-case-insensitive-p", Ffile_name_case_insensitive_p, /* If the file doesn't exist, move up the filesystem tree until we reach an existing directory or the root. */ - if (NILP (Ffile_exists_p (filename))) + if (NILP (Ffile_exists_p (filename)) + /* If default-directory is relative, expand-file-name can give + a relative name, in which case we can't move up. */ + && !NILP (Ffile_name_absolute_p (filename))) { filename = Ffile_name_directory (filename); while (NILP (Ffile_exists_p (filename))) Or maybe signal an error, either way seems better than just getting stuck.