From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: Carlos O'Donell <carlos@redhat.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Paul Eggert <eggert@cs.ucla.edu>,
libc-alpha@sourceware.org
Subject: Re: [PATCH v7 2/3] posix: regexec(): fix REG_STARTEND, pmatch->rm_so != 0 w/^ anchor
Date: Mon, 12 Jun 2023 16:03:02 +0200 [thread overview]
Message-ID: <n24v2hsgvdhy3vtlfrdiywraovpf4bg4d2khjzruc2f2ublvpa@u6jrvnj3cgjc> (raw)
In-Reply-To: <5d020c06-202e-b55b-80d3-aa3d840ebe0d@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]
On Mon, Jun 12, 2023 at 09:11:54AM -0400, Carlos O'Donell wrote:
> On 6/11/23 20:47, наб wrote:
> > re_search_internal () starts with
> > /* If initial states with non-begbuf contexts have no elements,
> > the regex must be anchored. If preg->newline_anchor is set,
> > we'll never use init_state_nl, so do not check it. */
> > if (dfa->init_state->nodes.nelem == 0
> > && dfa->init_state_word->nodes.nelem == 0
> > && (dfa->init_state_nl->nodes.nelem == 0
> > || !preg->newline_anchor))
> > {
> > if (start != 0 && last_start != 0)
> > return REG_NOMATCH;
> > start = last_start = 0;
> > }
> > and heretofor start and last_start (for example when "abc", {1, 2},
> > so matching just the "b") were != 0, and the return was taken for a "^b"
> > regex, which is erroneous.
> >
> > Fix this by giving re_search_internal (string+rm_so, start=0),
> > then fixing up the returned matches in an after-pass.
> >
> > This brings us to compatibility with the BSD spec and implementations.
> >
> > Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
>
> These changes are being made to sources shared between gnulib and glibc.
>
> As the files are listed in SHARED-SOURCES we cannot easily accept changes to them
> via DCO since they should be shared with gnulib which still requires copyright
> assignment.
>
> Would you be willing to disclaim these changes or assign copyright?
Quite happy to disclaim all patches here, yeah;
the process itself is unclear to me, however.
Best,
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-06-12 14:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 22:56 [PATCH v4 1/3] posix: add (failing) test for REG_STARTEND наб
2023-05-07 22:56 ` [PATCH v4 2/3] posix: regcomp(): clear RE_DOT_NOT_NULL наб
2023-05-07 22:56 ` [PATCH v4 3/3] posix: regexec(): fix REG_STARTEND, pmatch->rm_so != 0 w/^ anchor наб
2023-05-29 18:11 ` Adhemerval Zanella Netto
2023-05-29 13:22 ` [PATCH v5 1/3] posix: add (failing) test for REG_STARTEND наб
2023-05-29 13:22 ` [PATCH v5 2/3] posix: regcomp(): clear RE_DOT_NOT_NULL наб
2023-05-29 13:22 ` [PATCH v5 3/3] posix: regexec(): fix REG_STARTEND, pmatch->rm_so != 0 w/^ anchor наб
2023-05-29 17:37 ` [PATCH v4 1/3] posix: add (failing) test for REG_STARTEND Adhemerval Zanella Netto
2023-05-29 20:10 ` наб
2023-05-29 20:23 ` Adhemerval Zanella Netto
2023-06-12 0:47 ` [PATCH v7 1/3] posix: regcomp(): clear RE_DOT_NOT_NULL наб
2023-06-12 13:11 ` Carlos O'Donell
2023-06-12 0:47 ` [PATCH v7 2/3] posix: regexec(): fix REG_STARTEND, pmatch->rm_so != 0 w/^ anchor наб
2023-06-12 13:11 ` Carlos O'Donell
2023-06-12 14:03 ` наб [this message]
2023-06-12 0:47 ` [PATCH v7 3/3] posix: add test for REG_STARTEND наб
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=n24v2hsgvdhy3vtlfrdiywraovpf4bg4d2khjzruc2f2ublvpa@u6jrvnj3cgjc \
--to=nabijaczleweli@nabijaczleweli.xyz \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=eggert@cs.ucla.edu \
--cc=libc-alpha@sourceware.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).