From owner-freebsd-bugs@freebsd.org Thu Nov 12 19:05:19 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F48B4625CD for ; Thu, 12 Nov 2020 19:05:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4CX9z330xPz4djS for ; Thu, 12 Nov 2020 19:05:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 672BE462453; Thu, 12 Nov 2020 19:05:19 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66F3F462452 for ; Thu, 12 Nov 2020 19:05:19 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CX9z32PwGz4djR for ; Thu, 12 Nov 2020 19:05:19 +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 4628D345F for ; Thu, 12 Nov 2020 19:05:19 +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 0ACJ5II7006571 for ; Thu, 12 Nov 2020 19:05:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0ACJ5Iqc006570 for bugs@FreeBSD.org; Thu, 12 Nov 2020 19:05:18 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: =?UTF-8?B?W0J1ZyAyNTEwODFdIEdyZXAgQ3Jhc2hlcyB3aXRoIGJvdGggwqst?= =?UTF-8?B?LWFmdGVyLWNvbnRleHTCuyDCqy0tbWF4LWNvdW50wrsgU3dpdGNoZXMgYXJl?= =?UTF-8?B?IFVzZWQ=?= Date: Thu, 12 Nov 2020 19:05:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: CrazyMihey@Ya.Ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2020 19:05:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251081 Bug ID: 251081 Summary: Grep Crashes with both =C2=AB--after-context=C2=BB =C2= =AB--max-count=C2=BB Switches are Used Product: Base System Version: 12.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: CrazyMihey@Ya.Ru Created attachment 219606 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D219606&action= =3Dedit Grep Memory Dump 12.2 x64 FreeBSD Grep Utility Crushes in a case of simultaneously specifying two Switches: =C2=AB--after-context=3DNUM=C2=BB (-A NUM) and =C2=AB--max-count= =3DNUM=C2=BB (-m NUM). This happens when Russian Language (for Example) is Used. The Example to ReProduce this Error (EveryOne can Try, if Brave enough): # id -c russian #grep --after-context=3D"10" --max-count=3D"2" "" "/etc/passwd" # $FreeBSD: releng/12.2/etc/master.passwd 359447 2020-03-30 17:07:05Z brook= s $ # Segmentation fault (=D1=81=D1=82=D0=B5=D0=BA =D0=BF=D0=B0=D0=BC=D1=8F=D1=82= =D0=B8 =D1=81=D0=B1=D1=80=D0=BE=D1=88=D0=B5=D0=BD =D0=BD=D0=B0 =D0=B4=D0=B8= =D1=81=D0=BA) or, without specifying the =C2=ABRussian=C2=BB LogIn Class (ReProduced on a= ny System): # env LANG=3D"ru_RU.UTF-8" grep --after-context=3D"10" --max-count=3D"2" "" "/etc/passwd" || printf "Error Number: %u (0x%.2X).\n" "${?}" "${?}" # $FreeBSD: releng/12.2/etc/master.passwd 359447 2020-03-30 17:07:05Z brook= s $ # Segmentation fault (=D1=81=D1=82=D0=B5=D0=BA =D0=BF=D0=B0=D0=BC=D1=8F=D1=82= =D0=B8 =D1=81=D0=B1=D1=80=D0=BE=D1=88=D0=B5=D0=BD =D0=BD=D0=B0 =D0=B4=D0=B8= =D1=81=D0=BA) Error Number: 139 (0x8B). # Looks like 0x80 + 0x0B: =C2=ABSIGSEGV=C2= =BB. shows the same Result. =C2=ABegrep=C2=BB does the same. # grep --version grep (GNU grep) 2.5.1-FreeBSD This Issue was found with these Systems: =E2=97=8F FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018 GE= NERIC amd64 =E2=97=8F FreeBSD 12.1-RELEASE-p2 r358570 CrazyBook i386 =E2=97=8F FreeBSD 12.2-RELEASE r366954 GENERIC i386 =E2=97=8F FreeBSD 12.2-RELEASE r366954 GENERIC amd64 This is not a Critical Error, but IMHO, Developers should Know about It. Thank You and Sorry, if It is not Important. --=20 You are receiving this mail because: You are the assignee for the bug.=