From patchwork Sat Feb 24 17:22:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald van Dijk X-Patchwork-Id: 10240437 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1ACEF602A0 for ; Sat, 24 Feb 2018 17:21:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2C3528B06 for ; Sat, 24 Feb 2018 17:21:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E733929C11; Sat, 24 Feb 2018 17:21:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAC0128B06 for ; Sat, 24 Feb 2018 17:21:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbeBXRVw (ORCPT ); Sat, 24 Feb 2018 12:21:52 -0500 Received: from home.gigawatt.nl ([83.163.3.213]:59492 "EHLO home.gigawatt.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbeBXRVw (ORCPT ); Sat, 24 Feb 2018 12:21:52 -0500 Received: from [IPv6:2001:980:4809:1:e045:1301:c405:78bf] (unknown [IPv6:2001:980:4809:1:e045:1301:c405:78bf]) by home.gigawatt.nl (Postfix) with ESMTPSA id 3D7AF5402945; Sat, 24 Feb 2018 17:21:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 home.gigawatt.nl 3D7AF5402945 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gigawatt.nl; s=default; t=1519492910; bh=lsN2EcVlx7rKNwDtDo/MYN4QmvIY9neyBoL2yyDOptE=; l=1179; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=kHzYspGxRlCm0KHgf7IUAHsd4UqTKSVIFh0svyrAQ0htRFL+AbQY/FlTO1ohSRajN U42suXSQoCHOjYnE0R/mhuCfr56cWWVUE6h3yZkD5Tw6jy97VX3wJ7vu+jIPkVDCNs NgsPRRs2mxaWgTOA0f5zhUSj+qWxv5Kjg2rcBBkk= Subject: Re: dash bug: double-quoted "\" breaks glob protection for next char To: Herbert Xu Cc: Denys Vlasenko , dash@vger.kernel.org References: <5e1ee06d-d1ca-6442-51de-786e2739d4df@gigawatt.nl> <297b41c4-0e15-e0d8-f088-d68acfcc3c0f@gigawatt.nl> <5a9d8ab5-ec2d-8101-2853-ac3be6b0c4f6@gigawatt.nl> <9f37ae19-6f74-f527-aa49-dd04c3c010f6@gigawatt.nl> <73e4ad51-1c3b-3173-429f-401296244869@gigawatt.nl> <20180224003344.GA3354@gondor.apana.org.au> <32935756-b1c4-70bc-2e72-4d2b0cb2a835@gigawatt.nl> <20180224165224.GA3864@gondor.apana.org.au> From: Harald van Dijk Message-ID: <86103623-85a1-b940-5f27-3705da6589cb@gigawatt.nl> Date: Sat, 24 Feb 2018 18:22:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 MIME-Version: 1.0 In-Reply-To: <20180224165224.GA3864@gondor.apana.org.au> Content-Language: en-US Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 2/24/18 5:52 PM, Herbert Xu wrote: > On Sat, Feb 24, 2018 at 10:47:07AM +0100, Harald van Dijk wrote: >> >> It seems like the new control character doesn't get escaped in one place >> where it should be, and gets lost because of that: >> >> Unpatched: >> >> $ dash -c 'x=`printf \\\211X`; echo $x | cat -v' >> M-^IX >> >> Patched: >> >> $ src/dash -c 'x=`printf \\\211X`; echo $x | cat -v' >> X > > Hmm, it works here. Can you check that your Makefile is up-to-date It was. > and the generated syntax.c looks like this: > > const char basesyntax[] = { > CEOF, CSPCL, CWORD, CCTL, > CCTL, CCTL, CCTL, CCTL, > CCTL, CCTL, CCTL, CCTL, Thanks, that was what was wrong. Although mksyntax did get re-executed because of your Makefile change, re-executing it didn't help: mksyntax doesn't use parser.h at run time, only at build time. So I think the Makefile.am change should instead be: Cheers, Harald van Dijk --- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,7 +66,7 @@ syntax.c syntax.h: mksyntax signames.c: mksignames ./$^ -mksyntax: token.h +mksyntax: parser.h token.h $(HELPERS): %: %.c $(COMPILE_FOR_BUILD) -o $@ $<