From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#8254: race condition in dired.c's scmp function Date: Tue, 15 Mar 2011 12:36:45 +0100 Message-ID: References: <4D7F043A.5070702@cs.ucla.edu> <4D7F15E7.1020407@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1300190845 22947 80.91.229.12 (15 Mar 2011 12:07:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Mar 2011 12:07:25 +0000 (UTC) Cc: 8254@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 15 13:07:17 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PzT1u-0006tx-Ry for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Mar 2011 13:07:15 +0100 Original-Received: from localhost ([127.0.0.1]:53060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzT1t-0006YB-Tg for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Mar 2011 08:07:14 -0400 Original-Received: from [140.186.70.92] (port=33677 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzT1h-0006UP-NT for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2011 08:07:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzT1g-0006nM-2L for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2011 08:07:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzT1f-0006mT-R0 for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2011 08:06:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PzSZe-0007Ma-Dc; Tue, 15 Mar 2011 07:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Mar 2011 11:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8254 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8254-submit@debbugs.gnu.org id=B8254.130018905228268 (code B ref 8254); Tue, 15 Mar 2011 11:38:02 +0000 Original-Received: (at 8254) by debbugs.gnu.org; 15 Mar 2011 11:37:32 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PzSZA-0007Ls-9A for submit@debbugs.gnu.org; Tue, 15 Mar 2011 07:37:32 -0400 Original-Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PzSZ8-0007Lh-Tv for 8254@debbugs.gnu.org; Tue, 15 Mar 2011 07:37:31 -0400 Original-Received: by gyf3 with SMTP id 3so207109gyf.3 for <8254@debbugs.gnu.org>; Tue, 15 Mar 2011 04:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=5EQBg6LkaQuzVTYN4OKLoC2e4vr/b4EZ1i+CgP0aP9w=; b=uLEct2pe6TknNGYp2yXBCGDIuNrkY179ub6+7C9dPscK9atPxZMpmiSdwWqD/EWC1F vunDR/FwwBzT43A/5FcGZMhtYSiw5vyjxFBu1Y0CJvdFlOBDg3LyfUw+bRmlBzRV4+uf ZelXX0qqmk2hrmKis8PF+av+/GRwSCMkh7RAQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=NY2NWh4cnqBJYxX0PlgiyByvDx56kRr0N/s0SmsZsNEfjL+pGQhXwBxfXT0zNxTqwe MwBYxDW66bWiNPOCyOET7q94df7C2oxpvZZ/yxB+3raxjVuR0QZfLOmZCPZIJjBHmNyc QPPXYC6Aww/JOHyfmFN8wv2ZBiWSVQJFNtjCg= Original-Received: by 10.151.27.16 with SMTP id e16mr3640930ybj.356.1300189045076; Tue, 15 Mar 2011 04:37:25 -0700 (PDT) Original-Received: by 10.147.34.11 with HTTP; Tue, 15 Mar 2011 04:36:45 -0700 (PDT) In-Reply-To: <4D7F15E7.1020407@cs.ucla.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 15 Mar 2011 07:38:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45022 Archived-At: On Tue, Mar 15, 2011 at 08:31, Paul Eggert wrote: > Generally speaking, > code is easier to read and contains fewer errors > when function-like macros act like functions. That's true, but then there's adding complexity when it is not needed. In this case, it is hard to know whether it is needed or not. On one hand, the only suspicious use of DOWNCASE is the one you pointed out. On the other hand, DOWNCASE begat UPPERCASEP, who begat LOWERCASEP and UPCASE (and also ISUPPER in regex.c). Not to mention UPCASE1, which uses the same variables and begat UPCASE (with LOWERCASEP) and NOCASEP... Though most of these cases use ?: and && and not =3D=3D, it is certainly tedious to check every instance of these macros. A (perhaps stupid) idea: would it be possible to define -DENABLE-CHECKING alternate versions of DOWNCASE and UPCASE1 which do some additional checking for side effects? That would allow finding the possible bugs during development. =C2=A0 =C2=A0 Juanma