From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1218 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general,gmane.comp.lib.gnulib.bugs Subject: Re: Re: musl bugs found through gnulib Date: Wed, 20 Jun 2012 22:21:16 -0400 Message-ID: <20120621022116.GX163@brightrain.aerifal.cx> References: <20120609230541.47eac2de@newbook> <4FD55156.7050302@cs.ucla.edu> <20120611182202.1ee4d019@newbook> <12545931.v3ALTEUUx8@linuix> <20120620192802.GW163@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1340245527 27991 80.91.229.3 (21 Jun 2012 02:25:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2012 02:25:27 +0000 (UTC) Cc: bug-gnulib@gnu.org, Isaac Dunham , Paul Eggert , Reuben Thomas To: musl@lists.openwall.com Original-X-From: musl-return-1219-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 21 04:25:25 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ShX5J-00079S-01 for gllmg-musl@plane.gmane.org; Thu, 21 Jun 2012 04:25:25 +0200 Original-Received: (qmail 17904 invoked by uid 550); 21 Jun 2012 02:25:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17896 invoked from network); 21 Jun 2012 02:25:24 -0000 Content-Disposition: inline In-Reply-To: <20120620192802.GW163@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1218 gmane.comp.lib.gnulib.bugs:31095 Archived-At: On Wed, Jun 20, 2012 at 03:28:02PM -0400, Rich Felker wrote: > > Replacement of getcwd, because of > > checking whether getcwd handles long file names properly... no, but it is partly working This test is failing because musl uses the kernel to resolve the current directory name, and the kernel does not support pathnames longer than PATH_MAX. For some reason, the test only considers this an error if AT_FDCWD is defined. Does gnulib aim to provide a getcwd that always works regardless of path depth? If so, replacing getcwd is the right action for gnulib on musl. > > checking whether getcwd aborts when 4k < cwd_length < 16k... no No is the correct result here. This test is looking for a bug that only exists on some archs with large page sizes (>4k), and no means it did not find the bug. > > Replacement of mktime, because of > > checking for working mktime... no This test is buggy; it goes into an infinite loop due to integer overflow UB, because the condition to break out of the loop is only checked when the test does not fail: for (j = 1; ; j <<= 1) if (! bigtime_test (j)) result |= 4; else if (INT_MAX / 2 < j) break; However this does indicate a bug in musl. The relevant code is very old and I suspect it's not checking for integer overflows at all, just generating huge time_t values that get truncated rather than mapped to (time_t)-1. Both need to be fixed. > > test-fcntl.c:382: assertion failed > > FAIL: test-fcntl > > Pending; intend to fix. Fixed. > > test-fma2.h:116: assertion failed > > FAIL: test-fma2 > > Unknown. Asking nsz.. Fixed by nsz. :-) Rich