From nobody Mon May 11 15:26:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gDk8k4gzdz6dB7Y for ; Mon, 11 May 2026 15:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gDk8k3PLlz40mp for ; Mon, 11 May 2026 15:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778513190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T4gsW2UcW6E7Gw9yu4uF0j0m6ZlJyEBz5azkWCc9yWI=; b=RyjvaoOEvXv04NidRCdSD8/CdxOdiwQd5cZdBUKtlU96/Wbra5Bzdb8BOK0Ip3gAS4DwQq OtBaKKSyw3alujUs5pej/5nErqq6EorkenaJMP6fWLjvcElRW+eTXDvJFM81RehaT/6hKN HlZdc9euggFrOYz3YEDKmZ6H5eIhkp+mRpbZCXOefivSO83ZpVReMYYgOcJ8sPK6xjxVB6 rJ7e6ayWXQwxjgPqssPYKlLsTp//CYrTSzD7eY3wz5t5TD8DVenEGsGk1USv9K4HQPFnuq cu+t6bP2g4FhHaU1NDYdoCTXIEeMK12F+9j78Xs/463hcunxlJS7Br0xMT1vwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778513190; a=rsa-sha256; cv=none; b=VxUsDvrre0IIur5WN/F+iofeJUf+mjDmIdNLAvZdM1qLce4pz5gFKjQfbjGqFlq00USN93 07wP4moy8AeEgdCCIdibFhWR+l0TTt4/ZVvhfVAJSaCJDwZE/rzRB5rjdBJ2ccW5ro7eAi sBJdWn9T0Oy+E4IN0iT7sJT3eGBHqAvXVY5jFo4LQGg53STo++YlOjWdFPfyqbHf+921QU lcz3DT0sInVjNjwZcYIO8viQA5GJkadj1pDshWYe9pMEuGE7TSI2GCIVwdhDH67m/XAuc7 DnekVGCCllxxYFOTChzqppizoA16cjv99CoLHdM472Bh46dP1SvROUH7ep8fkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778513190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T4gsW2UcW6E7Gw9yu4uF0j0m6ZlJyEBz5azkWCc9yWI=; b=dfAlorCXvGBBOmAHjSCuGEm5YM06BAgeWMu+ksTQb2MCHucJJ5+wGhY0EP3U098qF4iGMV a3p+fON9LVh7v69kIAtC7bMLXp6AFZCJYAWo4kHbB61zrP+HIPiDn/hQvx9jx7y90h2L4d hOMzgW3kJysoVxCmJpAQ5H5+qQOjrervdta/AbC2J+EiO7UEqH0eBvTsfmZrkFo6/2pe8E emXOkmHLSZzPmhXtkylQi38jh0yZDb0L/BBSlMre6GXO8W2McVeNFoV4A6e4Nl/CtSFAmn 9cqw/YRu61kZcpg6qIYSqyFLsoPeGfqMBjhSOlBofpUUkrho+G+zOIlkrr4kAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gDk8k2kMnz6wc for ; Mon, 11 May 2026 15:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33028 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 11 May 2026 15:26:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: d64438a09dc8 - stable/14 - libregex: fix our mapping for \w List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d64438a09dc8e466c969fbe94c1a2fa500554da4 Auto-Submitted: auto-generated Date: Mon, 11 May 2026 15:26:30 +0000 Message-Id: <6a01f526.33028.3f375504@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d64438a09dc8e466c969fbe94c1a2fa500554da4 commit d64438a09dc8e466c969fbe94c1a2fa500554da4 Author: Kyle Evans AuthorDate: 2025-08-08 18:21:03 +0000 Commit: Kyle Evans CommitDate: 2026-05-11 15:20:50 +0000 libregex: fix our mapping for \w A small oversight in our implementation of \w is that it's actually not strictly [[:alnum:]]. According to the GNU documentation, it's actually [[:alnum:]] + underscore. The fix is rather trivial: just add it to our set explicitly, and amend our test set to be sure that _ is actually included. PR: 287396 (cherry picked from commit d0ff5773cefaf3fa41b1be3e44ca35bd9d5f68ee) --- lib/libc/regex/regcomp.c | 1 + lib/libregex/tests/gnuext.in | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index eae4d02657e8..d1f0fc0d862f 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -1170,6 +1170,7 @@ p_b_pseudoclass(struct parse *p, char c) { /* PASSTHROUGH */ case 'w': p_b_cclass_named(p, cs, "alnum"); + CHadd(p, cs, '_'); break; case 'S': cs->invert = 1; diff --git a/lib/libregex/tests/gnuext.in b/lib/libregex/tests/gnuext.in index 8f49854235a9..3ce0f4af1b34 100644 --- a/lib/libregex/tests/gnuext.in +++ b/lib/libregex/tests/gnuext.in @@ -10,9 +10,9 @@ a\|b\|c b abc a (ab)\1 - abab abab \1(ab) C ESUBREG (a)(b)(c)(d)(e)(f)(g)(h)(i)\9 - abcdefghii abcdefghii -# \w, \W, \s, \S (alnum, ^alnum, space, ^space) -\w+ - -%@a0X- a0X -\w\+ b -%@a0X- a0X +# \w, \W, \s, \S (_alnum, ^_alnum, space, ^space) +\w+ - -%@a_0X- a_0X +\w\+ b -%@a_0X- a_0X \s+ - aSNTb SNT \s\+ b aSNTb SNT # Word boundaries (\b, \B, \<, \>, \`, \')