all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 8254@debbugs.gnu.org
Subject: bug#8254: race condition in dired.c's scmp function
Date: Tue, 15 Mar 2011 06:50:43 -0400	[thread overview]
Message-ID: <E1PzRpr-0008QC-4m@fencepost.gnu.org> (raw)
In-Reply-To: <4D7F15E7.1020407@cs.ucla.edu> (message from Paul Eggert on Tue,  15 Mar 2011 00:31:51 -0700)

> Date: Tue, 15 Mar 2011 00:31:51 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: 8254@debbugs.gnu.org
> 
> On 03/15/2011 12:06 AM, Eli Zaretskii wrote:
> > How about a much simpler fix:
> > 
> >   while (l
> >   	 && (c1 = DOWNCASE ((unsigned char) *s1++),
> > 	     c2 = DOWNCASE ((unsigned char) *s2++),
> > 	     c1 == c2))
> >     l--;
> > 
> > (with suitable declarations of c1 and c2)?  Will that fix the
> > undefined behavior?
> 
> Yes.  But surely it's better to fix the problem so that
> usage of DOWNCASE is less error-prone.  Generally speaking,
> code is easier to read and contains fewer errors
> when function-like macros act like functions.

Maybe, but I wonder if there's a better solution even if we decide to
make these macros functions: I don't like to have the same static
function in every file that includes buffer.h, on platforms that don't
support inline functions.

Anyway, this is Stefan's and Chong's call.  I just voiced my
astonishment that such a simple problem needs such a jumbo change.





  reply	other threads:[~2011-03-15 10:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15  6:16 bug#8254: race condition in dired.c's scmp function Paul Eggert
2011-03-15  7:06 ` Eli Zaretskii
2011-03-15  7:31   ` Paul Eggert
2011-03-15 10:50     ` Eli Zaretskii [this message]
2011-03-15 16:53       ` Paul Eggert
2011-03-15 11:36     ` Juanma Barranquero
2011-03-15 16:52       ` Paul Eggert
2011-03-15 16:58       ` Paul Eggert
2011-03-15 19:13         ` Stefan Monnier
2011-03-15 21:27           ` Paul Eggert
2011-03-16 13:19         ` Richard Stallman
2011-03-16 20:02           ` Paul Eggert
2011-03-17 16:56 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1PzRpr-0008QC-4m@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=8254@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.