From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3671 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: time code progress Date: Wed, 17 Jul 2013 09:31:10 -0400 Message-ID: <20130717133110.GB12469@brightrain.aerifal.cx> References: <20130716194553.GA9438@brightrain.aerifal.cx> <20130717093325.GA12469@brightrain.aerifal.cx> <20130717113906.GT15323@port70.net> 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: ger.gmane.org 1374067883 3167 80.91.229.3 (17 Jul 2013 13:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Jul 2013 13:31:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3675-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 17 15:31:25 2013 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 1UzRpD-00077z-LF for gllmg-musl@plane.gmane.org; Wed, 17 Jul 2013 15:31:23 +0200 Original-Received: (qmail 18211 invoked by uid 550); 17 Jul 2013 13:31:23 -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 18203 invoked from network); 17 Jul 2013 13:31:22 -0000 Content-Disposition: inline In-Reply-To: <20130717113906.GT15323@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3671 Archived-At: On Wed, Jul 17, 2013 at 01:39:06PM +0200, Szabolcs Nagy wrote: > * Rich Felker [2013-07-17 05:33:25 -0400]: > > Committed. Please let me know what bugs you find. :-) > > > > gcc found this: > > diff --git a/src/time/__map_file.c b/src/time/__map_file.c > index b6bf272..b322f09 100644 > --- a/src/time/__map_file.c > +++ b/src/time/__map_file.c > @@ -14,7 +14,7 @@ const char unsigned *__map_file(const char *pathname, size_t *size) > if (fd < 0) return 0; > if (!__syscall(SYS_fstat, fd, &st)) > map = __mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); > - __syscall(SYS_close); > + __syscall(SYS_close, fd); > *size = st.st_size; > return map == MAP_FAILED ? 0 : map; > } I'm glad to hear this is the worst bug found so far. :-) > (i think it did not like the syscall arg counting in case of 0 args in > #define __SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n > #define __SYSCALL_NARGS(...) __SYSCALL_NARGS_X(__VA_ARGS__,7,6,5,4,3,2,1,0) > ) Odd. I think 0-arg syscall is used elsewhere and works, but I agree it looks broken. Rich