From nobody Wed Sep 25 20:44:12 2024 X-Original-To: standards@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 4XDTH04lHYz5Xh7r for ; Wed, 25 Sep 2024 20:44:12 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDTH0330jz57gB for ; Wed, 25 Sep 2024 20:44:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727297052; 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: in-reply-to:in-reply-to:references:references; bh=1hHnW3nyNKSf7TayeDMdbMHIG+5eFYQxq1KY5HImccw=; b=i4g1nncjOrz6a7mVq/u53O41pdbWzhbqrHmuXBYareAOtyhHOvnc6kxVLFZ88iXdYetBd/ /thM3eqJNpqzEUfv59HMISeLIgsyfs7gmV7tMi6tAqBGHWIvzi8u3LJmMaW8zNLw3uPfyi EzOZbcgCebD4AkpGoAidmjtP2TedMpfYnnAV0nETnYGI8xv+ehWQriITguq5wb5JEaRDAG m6JaQzzYBWkE/qCozGe0V0ZROC8PR113aoFQs/8XmJTIiBwlRd0yTOa75n0SE5UBaztne6 kMh7e/GT0UZ1luPUFRxLb3sWU4J6J2sQQQpdzxoAsaRvGz+WOMnHr6xohRum9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727297052; a=rsa-sha256; cv=none; b=F5NL8cJYvOuzmng4med/+qk4huQIFDrspuME92MfhCTiUdWIa8G6xU13XvkCiv3n6pvPRk ifE9U1+RTBHDF3rURXHf+Yq0lrR71zWToO8vvHCj1aURUMTcdZAb5Ylcg6QEarNsVMXQ5X dhJIkXBrFXX29rTENELF07oAuk5QW9yHSlrev/nm/vDEeDtGdn8cRZpVomr82wKhrJrUMG GP2LYGfttl6/Kiu6aKW/C1mMZS8u7qHUAwmT5Z75r47mawsq9VL7PX1pkL8n9yD9Ccl4OM KHIid1diIBoEfTIpfL5FUxi76tVMqtgTihMWeL0ZpiaUkghx15awAzeRbhakng== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XDTH02fbkzRwW for ; Wed, 25 Sep 2024 20:44:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 48PKiC3O039865 for ; Wed, 25 Sep 2024 20:44:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 48PKiCal039864 for standards@FreeBSD.org; Wed, 25 Sep 2024 20:44:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 281710] RegEXP bug in bracket expression [^...] - sed(1), grep(1), re_format(7) Date: Wed, 25 Sep 2024 20:44:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: kevans@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-standards@freebsd.org Sender: owner-freebsd-standards@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281710 --- Comment #9 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd96ce6d000703f3f57d9214b741e16cc7= 741d77e commit d96ce6d000703f3f57d9214b741e16cc7741d77e Author: Bill Sommerfeld AuthorDate: 2023-12-21 03:46:14 +0000 Commit: Kyle Evans CommitDate: 2024-09-25 20:42:28 +0000 regex: mixed sets are misidentified as singletons Fix "singleton" function used by regcomp() to turn character set matches into exact character matches if a character set has exactly one element. The underlying cset representation is complex; most critically it records"small" characters (codepoint less than either 128 or 256 depending on locale) in a bit vector, and "wide" characters in a secondary array. Unfortunately the "singleton" function uses to identify singleton sets treated a cset as a singleton if either the "small" or the "wide" sets had exactly one element (it would then ignore the other set). The easiest way to demonstrate this bug: $ export LANG=3DC.UTF-8 $ echo 'a' | grep '[ab=C3=A0]' It should match (and print "a") but instead it doesn't match because the single accented character in the set is misinterpreted as a singleton. PR: 281710 Reviewed by: kevans, yuripv Obtained from: illumos (cherry picked from commit 8f7ed58a15556bf567ff876e1999e4fe4d684e1d) lib/libc/regex/regcomp.c | 25 ++++++++++++++++++----- lib/libc/tests/regex/multibyte.sh | 43 +++++++++++++++++++++++++++++++++++= +++- 2 files changed, 62 insertions(+), 6 deletions(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=