From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8057 invoked from network); 25 Jan 2021 17:58:46 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 25 Jan 2021 17:58:46 -0000 Received: (qmail 3709 invoked by uid 550); 25 Jan 2021 17:58:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3690 invoked from network); 25 Jan 2021 17:58:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1611597512; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=Saf4f8HkQsG8qre1Czeb17M+sKgq7yX5clJqu02GHr8=; b=mUUGdTvHRWDA1H29l8mS5F3klHNIkleVfDJdTyQDkr+MvzmHm3rbm3SIbeCkwvBNm3 0jM6zUfeBzK2ZxotCW8DSsK7ztt1riiN56LQHec7Avwe9AnxaGCuJIBSXXPWJ8/LBG6h 8oULRzZF/Kux4nmLgbd8xAHG/yuyM0oX/wDFl+GNm8nuMBFX8nowHkDPjqpyL5jIzF4W sEHerN6GWZoA2m9ct0g8BsLWxr440wrM27BSfLcoKuBSLokmVVjqDHEkVZ0IbgVig50Y BhPYO2TaZVpAmUhd7JA8RxEw1w2/CV6D1tAFaEZ2yR4A64dxfqZQJcPUTWV44HHkVDER z/PA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyvs=" X-RZG-CLASS-ID: mo00 From: Bruno Haible To: Rich Felker Cc: musl@lists.openwall.com Date: Mon, 25 Jan 2021 18:58:30 +0100 Message-ID: <1697634.l5GBiYWEig@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20210125161512.GW23432@brightrain.aerifal.cx> References: <3521697.b4TYcCAa2N@omega> <2658009.jRRjQAZNrc@omega> <20210125161512.GW23432@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [musl] insufficient checking in posix_spawn_file_actions_add{open,dup2} Rich Felker wrote: > I'm not convinced that the standard as written > requires any comparison against sysconf(_SC_OPEN_MAX). Is there a > general rule somewhere that {x_MAX} in the text implies a requirement > to use the dynamic runtime value if x_MAX is undefined but there's a > corresponding _SC_x_MAX? As far as I understand, [1] defines the meaning of {OPEN_MAX}, and [2] says that {OPEN_MAX} is sysconf(_SC_OPEN_MAX). Also, [2] says "sysconf(_SC_OPEN_MAX) may return different values before and after a call to setrlimit() which changes the RLIMIT_NOFILE soft limit." Bruno [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html [2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html