From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121753 invoked by alias); 26 Mar 2018 15:16:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 121744 invoked by uid 89); 26 Mar 2018 15:16:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=HX-Envelope-From:sk:gabriel, H*F:D*br X-HELO: mo19.mail-out.ovh.net Date: Mon, 26 Mar 2018 15:16:00 -0000 From: "Gabriel F. T. Gomes" To: Zack Weinberg CC: Subject: Re: [PATCH 0/9] Use more flags parameters instead of global bits in stdio Message-ID: <20180326121624.67e57494@tereshkova> In-Reply-To: <20180307193205.4751-1-zackw@panix.com> References: <20180307193205.4751-1-zackw@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: EX4.emp.local (172.16.2.4) To EX3.emp.local (172.16.2.3) X-Ovh-Tracer-Id: 1068479014040424013 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrvdeigdekkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-SW-Source: 2018-03/txt/msg00547.txt.bz2 On Wed, 07 Mar 2018, Zack Weinberg wrote: >I got stuck on the patch to use C99-compliant scanf in _GNU_SOURCE >mode because the interaction with ldbl-is-dbl was too confusing. The >reason it's too confusing is that C99 compliance in scanf, ldbl-is-dbl >mode in scanf, printf, and strfmon, and fortify mode in printf are >handled with mode bits on the FILE and thread-global flags that must >be set and reset at just the right times. Correct behavior is >invariably to set and then reset around just one call to a lower-level >function, and there's a better way to do that: flags parameters. > >This patch series implements _internal variants of scanf, printf, >strfmon, and syslog that take flag parameters that control C99 >compliance, ldbl-is-dbl mode, and fortification. Thanks for doing this. It looks a lot less confusing now. >I regret the length >and the messiness, and it might make sense to squash it on landing. Although I haven't tested each patch in the patch set individually, they look self-contained and I don't see a compelling reason to squash them. I did, however, test a branch with all the patches applied on powerpc64 and powerp64le. The tests passed OK. >I have manually hacked the patches that introduce vfprintf-internal.c >and vfscanf-internal.c so the diffs are actually readable -- git doesn't >handle "rename this file and then create a new file in its place" very >well. Thanks for pointing this out, it made it easier to know what to do in order to apply them. Overall, the patch set looks good to me. I have some comments and questions for each individual patch, which I'm sending right away. (patches 1 through 5, that is. I didn't have time to write about patches 6 through 8).