From owner-svn-src-head@freebsd.org Thu Aug 16 17:05:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9CDC106F0A3 for ; Thu, 16 Aug 2018 17:05:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic317-20.consmr.mail.gq1.yahoo.com (sonic317-20.consmr.mail.gq1.yahoo.com [98.137.66.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D0858DF26 for ; Thu, 16 Aug 2018 17:05:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1534439123; bh=9PC7/AqnKU/3LxZKfw+gTwU6cEVBCDNtM/s1SnHlxYY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=alETOeQZH8uFx/fvKygzQgjCGREjPa7SixWoxArQGq2ki+04yj4Nrlm52xJMIKKjuPrQobXXGhcQMinmpFpbeGac2fb27f8AFwLD1/9NOIVvQ5awAeuCAbngwrAFxdfHA5WOB5pgguiUTeqXH8ZYgRtoZEKq2VOua2ZIg9vAvUQsUvC0m14vos8FsUVUNrqdn5Wsz8ceEcBZU+ukGApJM9/8dGk8GCrjj0fh74ZAhIMrQBEdyWTPCGFDZ+UrWKe/SICOfsPT+F9HIaaS2YL7flDy2OdS2HHke4NIA9HN//uVW5v2uEF4mJkVS4+0s+ZyMWgTs6tshxk1KJmseir+pw== X-YMail-OSG: RNUil2cVM1l_WSemxcJEu4VyFOvJT7NC8TEAqwyeZT5eQgmdiT5yWJcUEfjohNt 96Nrk8I57ajsX5CqF5QT9wmAVUbB_Yivpu6i0LOAymIel2xFqGm_e1qPHIGRvZrLeezcw7yCHUyn nz2xdJCdDNr6EF6b1JyW_WzcWC9dCkTuDWlwWbgm.ugjmvkYEQ90.sW345wjrhgdZICZY7IC7K7l NdEEJ_HlYtrQ0ylbFjQyzDIg9u1UTXRIWlc_hoBOa2bYeB3jNnJBOqphQQoxmnUHYjNNBgPxktl3 dsdMo7dUpsL2654aNnFrZ.wvlcXuOBJRo5ulfB76ZtCU6G_W4mbu4GUoCNPGWPkyHIvfnCxnrEEb y3W9rokxnwyKVK0WsuoC5X0p1ke9IfBtHav2D5PWTRhlxb4P5YQqhPQ7nTctdh8wGdknMDcIsv1f fUL66a..jNuMKQ2qbTmltk7Vyijml.pAdtkNZF_7tKMYxugmi8pmhEmKr2oIxI.kCcyVi94zn_Ng 1q9M_IHsyO5pQC0DUSfvpr0XgK3IRm9pFCuF65GSackDAmP2DlFfUgp6f6jfAZxBq9eRVXZTMb4y mLhLJ3xzgGC1InOOPCpX7qXnH4GVV_gb6rnKJ_Um50H9qs2xyFpMf6eFBoFPZl02sfTMz_ZQS2Ue qAbWYOP4zS4j8yQGvJVX22XLYCbsM_WQFNlAfrsuh.ovXr.jehdXzFDoxWL_Eeein1uI7Db7U92q _nuGhGkVTJkHtd3Wjk.mdPR8Vo78umSni7A26ipqjUiybYAi3EEEb8R6sqAN8rR.NcT693JNgoDQ AjKpx8.iLed707RJ.dAxB8HU9_KIefslGCG79BOmr12fOlGpUtdnmjvnbTWiex0Stu5xHxiifPkU gW7EH9Hj41CjXeTvBdagSYhseWLKoQV70TJAcAylTJoiSxxiISV0Sl0a8hr3KexOFzZmp3fQCeF7 S_o6lDIcyaoQok6k0qzLbdDdiW0AVvn8ImcDe8LPSVrIC_VzU89nGd0Qh8w-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Thu, 16 Aug 2018 17:05:23 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.3]) ([181.52.72.201]) by smtp409.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 0792cd4424ae219a3ac29f1596391224; Thu, 16 Aug 2018 17:05:19 +0000 (UTC) Subject: Re: svn commit: r337419 - head/usr.bin/sed To: Alan Somers Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808071447.w77Eld3I069906@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <0df14e6a-ccaf-d55f-d7cf-d95a243cf8c8@FreeBSD.org> Date: Thu, 16 Aug 2018 12:05:19 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 17:05:25 -0000 On 8/16/2018 10:30 AM, Alan Somers wrote: > On Tue, Aug 7, 2018 at 8:47 AM, Pedro F. Giffuni > wrote: > > Author: pfg > Date: Tue Aug  7 14:47:39 2018 > New Revision: 337419 > URL: https://svnweb.freebsd.org/changeset/base/337419 > > > Log: >   sed(1): partial fix for the case of the regex delimited with '['. > >   We don't generally support the weird case of regular expresions > delimited >   by an opening square bracket ('[') but POSIX says that inside >   bracket expressions, escaping is not possible and both '[' and '\' >   represent themselves. > >   PR:           230198 (exp-run) >   Obtained from:        OpenBSD > > Modified: >   head/usr.bin/sed/compile.c > > Modified: head/usr.bin/sed/compile.c > ============================================================================== > --- head/usr.bin/sed/compile.c  Tue Aug  7 14:39:00 2018        > (r337418) > +++ head/usr.bin/sed/compile.c  Tue Aug  7 14:47:39 2018        > (r337419) > @@ -393,11 +393,11 @@ compile_delimited(char *p, char *d, int is_tr) >                         if ((d = compile_ccl(&p, d)) == NULL) >                                 errx(1, "%lu: %s: unbalanced > brackets ([])", linenum, fname); >                         continue; > +               } else if (*p == '\\' && p[1] == c) { > +                       p++; >                 } else if (*p == '\\' && p[1] == '[') { >                         *d++ = *p++; > -               } else if (*p == '\\' && p[1] == c) > -                       p++; > -               else if (*p == '\\' && p[1] == 'n') { > +               } else if (*p == '\\' && p[1] == 'n') { >                         *d++ = '\n'; >                         p += 2; >                         continue; > > > This change seems to have caused a regression in multi_test.sh. > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/8630/testReport/usr.bin.sed/multi_test/main/ ____ Seeding /usr/tests/usr.bin/sed/regress.multitest.out/2.23 with current result sed: 1: "s[\[.[X[ ": RE error: brackets ([ ]) not balanced sed: 1: "s[\[.[X\[[ ": RE error: brackets ([ ]) not balanced ____ Thanks for the report. The change is correct but incomplete, we also have to fix the first bug reported here: http://undeadly.org/cgi?action=article;sid=20180728110010 I honestly don't have time for this so I'll revert the bug for the second fix for now. Pedro.