public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper.fsp@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Fix infinite loop in std::istream::ignore(n, delim) [PR93672]
Date: Thu, 4 Apr 2024 18:28:43 +0200	[thread overview]
Message-ID: <CAOPLpQf=OW=vzbbhuiQ7GrkXBti9=qhvQe3qZaUuTSu16TZArQ@mail.gmail.com> (raw)
In-Reply-To: <20240404153158.313297-1-jwakely@redhat.com>

On Thu, Apr 4, 2024 at 5:29 PM Jonathan Wakely <jwakely@redhat.com> wrote:
> I would appreciate more eyes on this to confirm my conclusions about
> negative int_type values, and the proposed fix, make sense.

The way something like this is handled in glibc's ctype functions is
that both branches are considered.  For isXXX(c) whether c is -v or
256-v the same value is returned (except for EOF which is -1).  This
caused the least number of bad surprises.

You could here also perform similar actions.

  parent reply	other threads:[~2024-04-04 16:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 15:29 Jonathan Wakely
2024-04-04 15:40 ` Iain Sandoe
2024-04-04 16:30   ` Jonathan Wakely
2024-04-04 16:55     ` Jonathan Wakely
2024-04-04 19:53       ` Jonathan Wakely
2024-04-04 16:28 ` Ulrich Drepper [this message]
2024-04-04 16:33   ` Jonathan Wakely
2024-04-04 16:35     ` Jonathan Wakely
2024-04-08 16:48 ` [PATCH v2] " Jonathan Wakely
2024-04-15 18:30   ` Jonathan Wakely

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='CAOPLpQf=OW=vzbbhuiQ7GrkXBti9=qhvQe3qZaUuTSu16TZArQ@mail.gmail.com' \
    --to=drepper.fsp@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).