Date: Wed, 17 Jul 2013 09:31:10 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: time code progress On Wed, Jul 17, 2013 at 01:39:06PM +0200, Szabolcs Nagy wrote: > * Rich Felker <dalias@...ifal.cx> [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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.