From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cichlid.ash.relay.mailchannels.net (cichlid.ash.relay.mailchannels.net [23.83.222.36]) by sourceware.org (Postfix) with ESMTPS id A77383858D20 for ; Tue, 11 Jul 2023 11:20:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A77383858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 278706C1EFD; Tue, 11 Jul 2023 11:20:18 +0000 (UTC) Received: from pdx1-sub0-mail-a286.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BD9C66C1835; Tue, 11 Jul 2023 11:20:15 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1689074415; a=rsa-sha256; cv=none; b=k0LhyaiNxMrL7U1SFfUHjid58X1eD9bJAsj/RayFMKKUT62N2wKsK9Ip4JW9U6hvtwPl/0 dPp0QX5jEJXC+k9PPNWKFB/4jrDkvaXBaQhbW5oovzFxf3ISzZghqQFKPB5FATPoQ4RnBE mzn3yC+0YNVePrwuqvWo3Y1jAtNlWgkd0StJ1e1eWKSZXhiQcilYXhqbRDmu+Fa7UpDTZ0 eaPel2BpRvAr0HkwMgpAuyB8uorTOcTADYbFSVn2dFgBSzhcOQ9S8LQqOQ6UAjjE6n5LJ4 mUB//Zf0hxdf0lx1lBgSMJWQJPgtlKQUTQwXgy4eN3IgJTrLlrH4PDRrTAqqpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1689074415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YhIcGDLHK0S25eCBYuTkPpYBKUwrA7RTaltjrQdQ7Qw=; b=4RaKcp9ZgV2kFUF9iykCk2a8o1MODF/kxnSWbhe91QJjrm0XT1IcpmtciDRgc8uoe/Yym6 JdZBRQw8qro3A/NoJCzMJZIMibaGCpo6ZEKRh/Q6gJZzZN/PZpo9YA4bdZtBWWmNfbUhz+ AR6zLvod5t5BGcftEU9XZNzD8EWbhE0X/qKSPIymKeIJZuLqDCKvUoY+3/JomYAT5mNu+A nHqunXtA2rGlVyhnGYGDMslHJAMeLHY1wU8T6vl7zOu876uuwM5aiphXqkWCoO/ZMyb747 vFx9Cexq4i4oT2C1UsY7qAl6Ljn64bxoxEyQcg4LnvMXZHytsphOvDI+LzwImw== ARC-Authentication-Results: i=1; rspamd-7d9c4d5c9b-nq969; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Hysterical-Irritate: 5fb8565069151074_1689074417593_592807835 X-MC-Loop-Signature: 1689074417593:3591328962 X-MC-Ingress-Time: 1689074417593 Received: from pdx1-sub0-mail-a286.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.126.30.12 (trex/6.9.1); Tue, 11 Jul 2023 11:20:17 +0000 Received: from [192.168.2.12] (bras-vprn-toroon4834w-lp130-09-174-91-45-44.dsl.bell.ca [174.91.45.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a286.dreamhost.com (Postfix) with ESMTPSA id 4R0dhG5LhHzC9; Tue, 11 Jul 2023 04:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1689074415; bh=YhIcGDLHK0S25eCBYuTkPpYBKUwrA7RTaltjrQdQ7Qw=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=W306/tiQQLRVLQPzWH9foxM3I4zU1KsIiL0S71pIRdpuOJGsmfe3xWz+JXtR648lC xV7gKCmwZ9xYgBU9Gnb2mLhBWPf+m1qCCZrMLHj0MRuXMNmgPvlVsG+4xFV0IOTyba 0/I5utPh4R/n8EY9+RWcduNHSYmYnMBU8VttdEHssF5SFoAfnxY5UEGsPhr+0lv6lR 4IpAzpLl03SaLaqHI3aGBX5q66wJP2FHKpIJukmaW8J/wEmJOHqTWdfuMYDVLHpCPV +dMFmoDbjn6b2KDg8oiYxrUwBybFqHX1f9gxEOtwMKFfmOJJaVtHk1l2OYy8iu3mHS Sv/m+wptpO8vg== Message-ID: <6c63f718-9a33-2596-754e-f978ead02766@gotplt.org> Date: Tue, 11 Jul 2023 07:20:10 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] Revert "libio: Add __nonnull for FILE * arguments of fclose and freopen" Content-Language: en-US To: Florian Weimer Cc: Xi Ruoyao , libc-alpha@sourceware.org, Adhemerval Zanella Netto , Carlos O'Donell , Alex Colomar , Andreas Schwab , Zack Weinberg , Jeff Law References: <20230710220659.3501429-2-xry111@xry111.site> <874jmbf2pl.fsf@oldenburg.str.redhat.com> <87ilaqesgq.fsf@oldenburg.str.redhat.com> From: Siddhesh Poyarekar In-Reply-To: <87ilaqesgq.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3030.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-07-11 04:57, Florian Weimer wrote: > * Florian Weimer: > >> * Siddhesh Poyarekar: >> >>> On 2023-07-10 18:07, Xi Ruoyao wrote: >>>> This reverts commit 71d9e0fe766a3c22a730995b9d024960970670af. >>>> Apparantly the maintainers do not like __nonnull. And I'm too >>>> pissed >>>> off to work on this anymore. Anyway I don't care about the analyzer so >>>> they can just add these as ugly special analyzer patterns. And I'm not >>>> so stupid to pass NULL to these things myself, so lacking a warning is >>>> not a problem to me. >>> >>> Sorry you feel this way, but this is still unresolved as we don't have >>> a consensus yet. However I understand if you're frustrated and don't >>> want to work on this for now; I do hope you return though. >>> >>> In any case, if the consensus does steer towards never using >>> __nonnull__, it'll likely be better to do it by hacking cdefs.h to >>> expand __nonnull to nothing. >> >> We can do this under #ifdef _LIBC. This way, analyzers can still >> benefit from the annotations, but the attribute does not affect the >> glibc build. >> >> It doesn't make sense to maintain the nonnull-ness of glibc function >> arguments outside glibc, so we should add these annotations to the >> installed headers. > > While trying to implement that, I found this in include/sys/cdefs.h: > > /* The compiler will optimize based on the knowledge the parameter is > not NULL. This will omit tests. A robust implementation cannot allow > this so when compiling glibc itself we ignore this attribute. */ > # undef __nonnull > # define __nonnull(params) Right, I mentioned this during the review of Xi's earlier patch. The side-effect of __nonnull is only limited to the caller. Sid