From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id 8EF643858C3A; Sun, 23 Jan 2022 15:36:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8EF643858C3A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=aquilenet.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aquilenet.fr Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E778F235; Sun, 23 Jan 2022 16:36:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QZZpNHBsWS9A; Sun, 23 Jan 2022 16:36:02 +0100 (CET) Received: from begin (lfbn-bor-1-255-114.w90-50.abo.wanadoo.fr [90.50.98.114]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 8B22763; Sun, 23 Jan 2022 16:36:02 +0100 (CET) Received: from samy by begin with local (Exim 4.95) (envelope-from ) id 1nBesG-002cN7-16; Sun, 23 Jan 2022 16:33:48 +0100 Date: Sun, 23 Jan 2022 16:33:47 +0100 From: Samuel Thibault To: Siddhesh Poyarekar Cc: libc-alpha@sourceware.org, joseph@codesourcery.com Subject: Re: [PATCH] tst-realpath-toolong: Fix hurd build Message-ID: <20220123153347.yptrgfkmumhcdv7j@begin> References: <20220122144523.2221584-1-siddhesh@sourceware.org> <20220123003600.a42uwp67446vlcep@begin> <2be97fb0-751d-1361-518a-24c131b49a51@sourceware.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2be97fb0-751d-1361-518a-24c131b49a51@sourceware.org> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: E778F235 X-Spamd-Result: default: False [0.40 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; MID_RHS_NOT_FQDN(0.50)[] X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jan 2022 15:36:11 -0000 Siddhesh Poyarekar, le dim. 23 janv. 2022 20:49:48 +0530, a ecrit: > On 23/01/2022 06:06, Samuel Thibault wrote: > > Siddhesh Poyarekar via Libc-alpha, le sam. 22 janv. 2022 20:15:23 +0530, a ecrit: > > > We don't really need a bigger buffer for realpath since it should fail > > > and return NULL. In the bug too, the buffer itself is not accessed; it > > > is in fact left untouched. Drop the PATH_MAX use and pass a single char > > > address. > > > > ? realpath assumes that the passed buffer is PATH_MAX-long. When > > PATH_MAX is not defined, calling it with a buffer is essentially > > undefined. Better just pass NULL. > > Passing NULL doesn't reproduce the problem because realpath just allocates > enough to accommodate the return, even when it exceeds PATH_MAX. Ah, ok, sorry I didn't check the whole story. > Would you prefer it if I defined PATH_MAX on hurd then, something like: > > #ifndef PATH_MAX > # define PATH_MAX 1024 > #endif > > or do you prefer a more accurate path_max value using pathconf()? Better use the accurate from pathconf() ; that being said it will return -1 on the ext2fs filesystem, so we'll have to resort to a hardcoded limit in that case anyway. I'm fine with just setting PATH_MAX by hand here. Samuel