From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 8254@debbugs.gnu.org
Subject: bug#8254: race condition in dired.c's scmp function
Date: Tue, 15 Mar 2011 00:31:51 -0700 [thread overview]
Message-ID: <4D7F15E7.1020407@cs.ucla.edu> (raw)
In-Reply-To: <E1PzOKa-0000Dq-Jl@fencepost.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.
next prev parent reply other threads:[~2011-03-15 7:31 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 [this message]
2011-03-15 10:50 ` Eli Zaretskii
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=4D7F15E7.1020407@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=8254@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.