From nobody Thu Oct 27 13:43:24 2022 X-Original-To: bugs@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 4Myn253Dy9z4g4WW for ; Thu, 27 Oct 2022 13:43:25 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Myn250LYgz3Mdt for ; Thu, 27 Oct 2022 13:43:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 4Myn246WFgzyx6 for ; Thu, 27 Oct 2022 13:43:24 +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 29RDhOsK009316 for ; Thu, 27 Oct 2022 13:43:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 29RDhOT0009315 for bugs@FreeBSD.org; Thu, 27 Oct 2022 13:43:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 264275] sed complaining about trailing backslash when using Umlauts Date: Thu, 27 Oct 2022 13:43:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: tamelingdaniel@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666878205; 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=X9xQhbElpjjTaD9BwZ8IGNX8JGqYqqByGl/kcP6pq1k=; b=UYkkI33539WDweZNoQ0woqeMh2cRBIibI5YHc+B3gi5zGPOgWSOGciPtMknN9o68Sk8iVG f0ivsH9ieUVASPbbAg6gfy99H1jyiTJBQigb+aLxVjuW9yu5fYpRH55RLTIfrp8wDmY6ug lnbN7JY4p2tVc2AAA4f/eNFbXwoKmNW6HTtLOVs0PLDCtqobm4rvfRX+fqZq/3/1c1y6Nr FJSn1MAVoeI+UWYIVrHZlo4x/QrllWz5C8b6ADOoxjM66YXXIvKZ3TTJOiRtm9k9WYKgQM zUWDSfxrEtC/9rZw8BDChOqhh/36gRt0yZc5sOCCu+o7tL7SzjlqlbPKD7IMgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666878205; a=rsa-sha256; cv=none; b=lFQsADz308z+ZnL7FYIDu26AmvOr4Ex4iGrR9llZjSIdWrZLmQF1XQUYBd/roTt2D5boUt JNfjLnJRFy9jvTXq4y2lQ1YiLUfpaRUYqmr65hOGwvS5vOuq7fD5Mr4t1QUODgzCmDEpQW wIbFUwTA44xAURTYbfFLSSqw8WK8YKWeBC6vu2avL/PvcrPN0vUoLTwTH7C9mQa6luj+Ft 7P8SgM+yse1tWzu523m0++7NWlb7Ey3J61VhaE/3cW6GRF8kcuDRj1ugxIeE4nZiZ4T4FY Yi0X4AhnyTTJ9KBGsJV+uLHm6K4I8Y14AbGHSjMTPP/xgt9l46wYF3mQWcZNRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264275 Daniel Tameling changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tamelingdaniel@gmail.com --- Comment #1 from Daniel Tameling --- The error comes from trying to compile the umlaut as a regex. I managed to create a small reproducer that just calls regcomp. The error seems to come from this snippet in the p_simp_re function in lib/libc/regex/regcomp.c: if ((c & BACKSL) =3D=3D 0 || may_escape(p, wc)) ordinary(p, wc); else SETERROR(REG_EESCAPE); Both checks in the if statement are false and thus we end up with the trail= ing backslash error. In may_escape this is the return statement that gets taken: if (isalpha(ch) || ch =3D=3D '\'' || ch =3D=3D '`') return (false); ch is the wint_t representation of the umlaut, which is 0xe4. In de_DE.ISO8859-1, the isalpha call returns true. (If I do it with an UTF8 = =C3=A4 in an UTF8 locale, ch becomes also 0xe4, but the isalpha call returns false, so this doesn't trigger the trailing backslash error.) --=20 You are receiving this mail because: You are the assignee for the bug.=