From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by sourceware.org (Postfix) with ESMTP id D1B783858D20 for ; Mon, 12 Jun 2023 14:03:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1B783858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=nabijaczleweli.xyz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nabijaczleweli.xyz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1686578583; bh=bDNuoed1FJGz6UogLVhoK3HIr/2jbUx9tNlWxMCRAXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QdigsVUlJ8zhGR7VDK26BErOd0DsN6Fw/xD+KJN/Bb4RHzbMLScCUAT3OdQ5kcZkT oGwOtTMcqTu6HNGEduk1PpILNtB7Zyn4B6d2csOQh/xd2oaR9t7U7HaDXR2G/olzDb gWp7cV4bHIzgnfrR+e0vkkaQWoIvwWxok+PAYxQiaZiWguUqbuWp6Nwq4GpnyxwbV7 ROmN85tHGasSjFEbyTCpqZkZRC7PeAkN6VzVn+TOwwA1W4Vsk/fhOOipVRpYcYVCwn C/wb9C7ZsKP72qJ2Uxssoxfh4yoHO1ldEr/VGd4DghZQgalAnx72l4OvhMbj0FqXxq Pk+XSsLvxpXiw== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id B872B688; Mon, 12 Jun 2023 16:03:03 +0200 (CEST) Date: Mon, 12 Jun 2023 16:03:02 +0200 From: =?utf-8?B?0L3QsNCx?= To: Carlos O'Donell Cc: Adhemerval Zanella Netto , Paul Eggert , libc-alpha@sourceware.org Subject: Re: [PATCH v7 2/3] posix: regexec(): fix REG_STARTEND, pmatch->rm_so != 0 w/^ anchor Message-ID: References: <4450a8f3-3774-5bbc-ebe2-64d8a25fdacc@linaro.org> <695cd581035b59c759477b806640ee0b70df05f7.1686530834.git.nabijaczleweli@nabijaczleweli.xyz> <5d020c06-202e-b55b-80d3-aa3d840ebe0d@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4cjzfbhd3ee4cheu" Content-Disposition: inline In-Reply-To: <5d020c06-202e-b55b-80d3-aa3d840ebe0d@redhat.com> User-Agent: NeoMutt/20230517 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_INFOUSMEBIZ,PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --4cjzfbhd3ee4cheu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 12, 2023 at 09:11:54AM -0400, Carlos O'Donell wrote: > On 6/11/23 20:47, =D0=BD=D0=B0=D0=B1 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 =3D=3D 0 > > && dfa->init_state_word->nodes.nelem =3D=3D 0 > > && (dfa->init_state_nl->nodes.nelem =3D=3D 0 > > || !preg->newline_anchor)) > > { > > if (start !=3D 0 && last_start !=3D 0) > > return REG_NOMATCH; > > start =3D last_start =3D 0; > > } > > and heretofor start and last_start (for example when "abc", {1, 2}, > > so matching just the "b") were !=3D 0, and the return was taken for a "= ^b" > > regex, which is erroneous. > >=20 > > Fix this by giving re_search_internal (string+rm_so, start=3D0), > > then fixing up the returned matches in an after-pass. > >=20 > > This brings us to compatibility with the BSD spec and implementations. > >=20 > > Signed-off-by: Ahelenia Ziemia=C5=84ska >=20 > These changes are being made to sources shared between gnulib and glibc. >=20 > 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 copy= right > assignment. >=20 > 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.=20 Best, --4cjzfbhd3ee4cheu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmSHJZQACgkQvP0LAY0m WPFt6xAAl1NeHujvRuKtrYS45QhBk3RWWsgJpITk0WJoU9h4Sgq2nEeSl77pNKF3 mK8fC6QWf0xkbG0IDyHsmv3068ARpe047Ol5MreIA7A4fgq+VSA4UWEV3TB/aL1S iuuiinZM/gf1rS5RbKasLr/gRp4OKuYFv5xFIArWfaMzfqn/nJskFMe7EOj5YZ3p wJtx1zJ3nJ5eueSsvwBCk2JMUomCSf8+xpUqLbmnjZtxl4po/pdvXd6VpgjhuEQ8 qa930lQzfkNMdfZUlqQKF8GosQ+fhPC5iemVQ8HZ0LiH/hYXSb9EhzoiSKYBl7Td xDzRwYYRRalr25TQZ0WhIxgGwdwin5K7d5V2OePBiqjcgNG4SHQrEtEDXSa2togK fODW4Sw6dk3A2qFKiif7lP3v8FJWwmH+SviR+vSROngtj3titPCf8oWM4YTsK37J 7o44Z7GrYNE7ZEEdhytJaltPcQbhaiqh2OSQnYeddQqKHoS/VG9l4zNWqTKWNRFv bvXlLAl8aRTmsuxOZhxxmlhpBdNBVlVFPftps6IhugwyaJJhnMB34RAfaJ06zpYE 3YeCLAydSBgd4j4Ma+SvPAHkklAWVchsBGIzimcfOQIQE0aZsNT3gYutaW3MYEXz EhAW5pQkkDiNEyJoqUfA14U1Ah3RNDicuAWs5ZG9dYVOT7SSgX4= =WblA -----END PGP SIGNATURE----- --4cjzfbhd3ee4cheu--