From vapier at uclibc.org Wed May 2 01:03:24 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Wed, 2 May 2007 01:03:24 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/unistd Message-ID: <20070502080324.8B70348576@busybox.net> Author: vapier Date: 2007-05-02 01:03:22 -0700 (Wed, 02 May 2007) New Revision: 18535 Log: Daniel Jacobowitz: sleep()/usleep() relies on nanosleep() being a cancellation point but the files have "libc_hidden_proto(nanosleep)" which means it always calls the libc.so version, never the wrapped version in libpthread.so that's a cancellation point. Modified: trunk/uClibc/libc/unistd/sleep.c trunk/uClibc/libc/unistd/usleep.c Changeset: Modified: trunk/uClibc/libc/unistd/sleep.c =================================================================== --- trunk/uClibc/libc/unistd/sleep.c 2007-05-01 20:07:29 UTC (rev 18534) +++ trunk/uClibc/libc/unistd/sleep.c 2007-05-02 08:03:22 UTC (rev 18535) @@ -30,7 +30,7 @@ //libc_hidden_proto(__sigaddset) //libc_hidden_proto(__sigemptyset) //libc_hidden_proto(__sigismember) -libc_hidden_proto(nanosleep) +/*libc_hidden_proto(nanosleep) need the reloc for cancellation*/ #if 0 /* This is a quick and dirty, but not 100% compliant with Modified: trunk/uClibc/libc/unistd/usleep.c =================================================================== --- trunk/uClibc/libc/unistd/usleep.c 2007-05-01 20:07:29 UTC (rev 18534) +++ trunk/uClibc/libc/unistd/usleep.c 2007-05-02 08:03:22 UTC (rev 18535) @@ -9,7 +9,7 @@ #include #include -libc_hidden_proto(nanosleep) +/*libc_hidden_proto(nanosleep) need the reloc for cancellation*/ int usleep (__useconds_t usec) { From vapier at uclibc.org Wed May 2 01:05:09 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Wed, 2 May 2007 01:05:09 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/termios Message-ID: <20070502080509.354264857C@busybox.net> Author: vapier Date: 2007-05-02 01:05:09 -0700 (Wed, 02 May 2007) New Revision: 18536 Log: Nickolai Zeldovich writes: Currently, tcgetpgrp() in uClibc uses an int to store a PID (fetched via ioctl TIOCGPGRP). This causes problems on platforms where pid_t is defined to be larger (e.g., uint64_t). Other functions in termios, such as tcgetsid() and tcsetpgrp(), already pass a pid_t to ioctl(), so the following patch does the same in tcgetpgrp() as well. Modified: trunk/uClibc/libc/termios/tcgetpgrp.c Changeset: Modified: trunk/uClibc/libc/termios/tcgetpgrp.c =================================================================== --- trunk/uClibc/libc/termios/tcgetpgrp.c 2007-05-02 08:03:22 UTC (rev 18535) +++ trunk/uClibc/libc/termios/tcgetpgrp.c 2007-05-02 08:05:09 UTC (rev 18536) @@ -27,10 +27,10 @@ /* Return the foreground process group ID of FD. */ pid_t tcgetpgrp (int fd) { - int pgrp; + pid_t pgrp; if (ioctl (fd, TIOCGPGRP, &pgrp) < 0) - return (pid_t) -1; - return (pid_t) pgrp; + return -1; + return pgrp; } libc_hidden_def (tcgetpgrp) From vapier at uclibc.org Wed May 2 01:10:23 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Wed, 2 May 2007 01:10:23 -0700 (PDT) Subject: svn commit: trunk/uClibc/test/pthread Message-ID: <20070502081023.1D7A9485C1@busybox.net> Author: vapier Date: 2007-05-02 01:10:22 -0700 (Wed, 02 May 2007) New Revision: 18537 Log: exercise all required POSIX pthread cancellation points Added: trunk/uClibc/test/pthread/cancellation-points.c Changeset: Added: trunk/uClibc/test/pthread/cancellation-points.c =================================================================== --- trunk/uClibc/test/pthread/cancellation-points.c (rev 0) +++ trunk/uClibc/test/pthread/cancellation-points.c 2007-05-02 08:10:22 UTC (rev 18537) @@ -0,0 +1,280 @@ +/* + * Make sure functions marked as cancellation points actually are. + * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_05 + */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* take care of optional things ... */ +#define STUB(func, args) static void func args { sleep(0); } +#if !defined(__UCLIBC__) || defined(__UCLIBC_AIO__) +# include +#else +STUB(aio_suspend, (void *p, int n, const void *p2)) +#endif +#if !defined(__UCLIBC__) || defined(__UCLIBC_STROPTS__) +# include +#else +STUB(getmsg, (int f, void *p, void *p2, void *p3)) +STUB(getpmsg, (int f, void *p, void *p2, void *p3, void *p4)) +STUB(putmsg, (int f, void *p, void *p2, void *p3)) +STUB(putpmsg, (int f, void *p, void *p2, void *p3, void *p4)) +#endif +#if defined(__UCLIBC__) +STUB(clock_nanosleep, (int i, int f, const void *p, void *p2)) +#endif + +int cnt; +bool ready; + +void cancel_timeout(int sig) +{ + ready = false; +} +void cancel_thread_cleanup(void *arg) +{ + ready = false; +} + +/* some funcs need some help as they wont take NULL args ... */ +const struct timespec zero_sec = { .tv_sec = 0, .tv_nsec = 0 }; + +sem_t sem; +void help_sem_setup(void) +{ + if (sem_init(&sem, 0, 1) == -1) { + perror("sem_init() failed"); + exit(-1); + } +} + +pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +pthread_mutex_t mutex; +void help_pthread_setup(void) +{ + pthread_mutex_init(&mutex, NULL); + pthread_mutex_lock(&mutex); +} + +/* the pthread function that will call the cancellable function over and over */ +#define _MAKE_CANCEL_THREAD_FUNC_EX(func, sysfunc, args, setup) \ +void *cancel_thread_##func(void *arg) \ +{ \ + if (pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL)) { \ + perror("unable to set cancel type to deferred; something is seriously broken"); \ + exit(-1); \ + } \ + pthread_cleanup_push(cancel_thread_cleanup, NULL); \ + setup; \ + ready = true; \ + while (ready) \ + sysfunc args; \ + pthread_cleanup_pop(1); \ + return NULL; \ +} +#define MAKE_CANCEL_THREAD_FUNC_RE(func, sysfunc, args) _MAKE_CANCEL_THREAD_FUNC_EX(func, sysfunc, args, (void)0) +#define MAKE_CANCEL_THREAD_FUNC_EX(func, args, setup) _MAKE_CANCEL_THREAD_FUNC_EX(func, func, args, setup) +#define MAKE_CANCEL_THREAD_FUNC(func, args) _MAKE_CANCEL_THREAD_FUNC_EX(func, func, args, (void)0) + +MAKE_CANCEL_THREAD_FUNC(accept, (-1, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(aio_suspend, (NULL, 0, &zero_sec)) +MAKE_CANCEL_THREAD_FUNC(clock_nanosleep, (0, 0, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(close, (-1)) +MAKE_CANCEL_THREAD_FUNC(connect, (-1, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(creat, ("", 0)) +MAKE_CANCEL_THREAD_FUNC(fcntl, (0, F_SETLKW, NULL)) +MAKE_CANCEL_THREAD_FUNC(fdatasync, (-1)) +MAKE_CANCEL_THREAD_FUNC(fsync, (0)) +MAKE_CANCEL_THREAD_FUNC(getmsg, (-1, NULL, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(getpmsg, (-1, NULL, NULL, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(lockf, (-1, F_TEST, 0)) +MAKE_CANCEL_THREAD_FUNC(mq_receive, (0, NULL, 0, NULL)) +MAKE_CANCEL_THREAD_FUNC(mq_send, (0, NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(mq_timedreceive, (0, NULL, 0, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(mq_timedsend, (0, NULL, 0, 0, NULL)) +MAKE_CANCEL_THREAD_FUNC(msgrcv, (-1, NULL, 0, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(msgsnd, (-1, NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(msync, (NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(nanosleep, (NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(open, ("", 0)) +MAKE_CANCEL_THREAD_FUNC(pause, ()) +MAKE_CANCEL_THREAD_FUNC(poll, (NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(pread, (-1, NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(pselect, (0, NULL, NULL, NULL, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC_EX(pthread_cond_timedwait, (&cond, &mutex, &zero_sec), help_pthread_setup()) +MAKE_CANCEL_THREAD_FUNC_EX(pthread_cond_wait, (&cond, &mutex), help_pthread_setup()) +/*MAKE_CANCEL_THREAD_FUNC_EX(pthread_join, (0, NULL))*/ +MAKE_CANCEL_THREAD_FUNC(pthread_testcancel, ()) +MAKE_CANCEL_THREAD_FUNC(putmsg, (-1, NULL, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(putpmsg, (-1, NULL, NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(pwrite, (-1, NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(read, (-1, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(readv, (-1, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(recv, (-1, NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(recvfrom, (-1, NULL, 0, 0, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(recvmsg, (-1, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(select, (0, NULL, NULL, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC_EX(sem_timedwait, (&sem, &zero_sec), help_sem_setup()) +MAKE_CANCEL_THREAD_FUNC_EX(sem_wait, (&sem), help_sem_setup()) +MAKE_CANCEL_THREAD_FUNC(send, (-1, NULL, 0, 0)) +MAKE_CANCEL_THREAD_FUNC(sendmsg, (-1, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(sendto, (-1, NULL, 0, 0, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(sigpause, (0)) +MAKE_CANCEL_THREAD_FUNC(sigsuspend, (NULL)) +MAKE_CANCEL_THREAD_FUNC(sigtimedwait, (NULL, NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(sigwait, (NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(sigwaitinfo, (NULL, NULL)) +MAKE_CANCEL_THREAD_FUNC(sleep, (0)) +MAKE_CANCEL_THREAD_FUNC(system, ("")) +MAKE_CANCEL_THREAD_FUNC(tcdrain, (-1)) +MAKE_CANCEL_THREAD_FUNC(usleep, (0)) +MAKE_CANCEL_THREAD_FUNC(wait, (NULL)) +MAKE_CANCEL_THREAD_FUNC(waitid, (0, 0, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(waitpid, (-1, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(write, (-1, NULL, 0)) +MAKE_CANCEL_THREAD_FUNC(writev, (-1, NULL, 0)) + +/* test a few variations that should not cancel ... */ +MAKE_CANCEL_THREAD_FUNC_RE(fcntl_another, fcntl, (0, F_GETFD)) + +/* main test that creates thread, cancels it, etc... */ +int _test_func(const char *func_name, void *(*func)(void*), const int should_cancel) +{ + int ret; + pthread_t cancel_thread_id; + + ++cnt; + + printf("testing %-30s ", func_name); + + printf("."); + if (signal(SIGALRM, cancel_timeout) == SIG_ERR) { + perror("unable to bind SIGALRM"); + exit(-1); + } + + printf("."); + ready = false; + pthread_create(&cancel_thread_id, NULL, func, NULL); + + printf("."); + while (!ready) + sched_yield(); + + printf("."); + if (pthread_cancel(cancel_thread_id)) { + perror("unable to cancel thread"); + exit(-1); + } + + printf("."); + alarm(5); + while (ready) + sched_yield(); + + printf("."); + ret = (!!!alarm(0) == should_cancel); + + if (ret) + printf(" failed ;(\n"); + else + printf(" OK!\n"); + + return ret; +} +#define TEST_FUNC(f) _test_func(#f, cancel_thread_##f, 1) +#define TEST_FUNC_RE(f) _test_func(#f, cancel_thread_##f, 0) + +int main(int argc, char *argv[]) +{ + int ret = 0; + setbuf(stdout, NULL); + cnt = 0; + + ret += TEST_FUNC(accept); + ret += TEST_FUNC(aio_suspend); + ret += TEST_FUNC(clock_nanosleep); + ret += TEST_FUNC(close); + ret += TEST_FUNC(connect); + ret += TEST_FUNC(creat); + ret += TEST_FUNC(fcntl); + ret += TEST_FUNC(fdatasync); + ret += TEST_FUNC(fsync); + ret += TEST_FUNC(getmsg); + ret += TEST_FUNC(getpmsg); + ret += TEST_FUNC(lockf); + ret += TEST_FUNC(mq_receive); + ret += TEST_FUNC(mq_send); + ret += TEST_FUNC(mq_timedreceive); + ret += TEST_FUNC(mq_timedsend); + ret += TEST_FUNC(msgrcv); + ret += TEST_FUNC(msgsnd); + ret += TEST_FUNC(msync); + ret += TEST_FUNC(nanosleep); + ret += TEST_FUNC(open); + ret += TEST_FUNC(pause); + ret += TEST_FUNC(poll); + ret += TEST_FUNC(pread); + ret += TEST_FUNC(pselect); + ret += TEST_FUNC(pthread_cond_timedwait); + ret += TEST_FUNC(pthread_cond_wait); + /*ret += TEST_FUNC(pthread_join);*/ + ret += TEST_FUNC(pthread_testcancel); + ret += TEST_FUNC(putmsg); + ret += TEST_FUNC(putpmsg); + ret += TEST_FUNC(pwrite); + ret += TEST_FUNC(read); + ret += TEST_FUNC(readv); + ret += TEST_FUNC(recv); + ret += TEST_FUNC(recvfrom); + ret += TEST_FUNC(recvmsg); + ret += TEST_FUNC(select); + ret += TEST_FUNC(sem_timedwait); + ret += TEST_FUNC(sem_wait); + ret += TEST_FUNC(send); + ret += TEST_FUNC(sendmsg); + ret += TEST_FUNC(sendto); + ret += TEST_FUNC(sigpause); + ret += TEST_FUNC(sigsuspend); + ret += TEST_FUNC(sigtimedwait); + ret += TEST_FUNC(sigwait); + ret += TEST_FUNC(sigwaitinfo); + ret += TEST_FUNC(sleep); + ret += TEST_FUNC(system); + ret += TEST_FUNC(tcdrain); + ret += TEST_FUNC(usleep); + ret += TEST_FUNC(wait); + ret += TEST_FUNC(waitid); + ret += TEST_FUNC(waitpid); + ret += TEST_FUNC(write); + ret += TEST_FUNC(writev); + + ret += TEST_FUNC_RE(fcntl_another); + + if (ret) + printf("!!! %i / %i tests failed\n", ret, cnt); + + return ret; +} From vapier at uclibc.org Wed May 2 11:20:59 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Wed, 2 May 2007 11:20:59 -0700 (PDT) Subject: svn commit: trunk/uClibc/test/pthread Message-ID: <20070502182059.C0C9B485D1@busybox.net> Author: vapier Date: 2007-05-02 11:20:58 -0700 (Wed, 02 May 2007) New Revision: 18540 Log: cancellation-points needs librt Modified: trunk/uClibc/test/pthread/ trunk/uClibc/test/pthread/Makefile Changeset: Property changes on: trunk/uClibc/test/pthread ___________________________________________________________________ Name: svn:ignore - ex1 ex2 ex3 ex4 ex5 ex6 ex7 *_glibc *.gdb *.out + ex1 ex2 ex3 ex4 ex5 ex6 ex7 cancellation-points tst-too-many-cleanups *_glibc *.gdb *.out Modified: trunk/uClibc/test/pthread/Makefile =================================================================== --- trunk/uClibc/test/pthread/Makefile 2007-05-02 15:35:45 UTC (rev 18539) +++ trunk/uClibc/test/pthread/Makefile 2007-05-02 18:20:58 UTC (rev 18540) @@ -4,3 +4,5 @@ include ../Test.mak EXTRA_LDFLAGS := -lpthread + +LDFLAGS_cancellation-points := -lrt From vapier at uclibc.org Thu May 3 16:13:05 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Thu, 3 May 2007 16:13:05 -0700 (PDT) Subject: svn commit: trunk/uClibc/test/malloc Message-ID: <20070503231305.4CDA2485DC@busybox.net> Author: vapier Date: 2007-05-03 16:13:04 -0700 (Thu, 03 May 2007) New Revision: 18553 Log: give proper prototypes Modified: trunk/uClibc/test/malloc/malloc-standard-alignment.c trunk/uClibc/test/malloc/realloc-can-shrink.c Changeset: Modified: trunk/uClibc/test/malloc/malloc-standard-alignment.c =================================================================== --- trunk/uClibc/test/malloc/malloc-standard-alignment.c 2007-05-03 22:57:56 UTC (rev 18552) +++ trunk/uClibc/test/malloc/malloc-standard-alignment.c 2007-05-03 23:13:04 UTC (rev 18553) @@ -23,7 +23,7 @@ struct llist_s *link; } *phead; -int main() +int main(int argc, char *argv[]) { char *line, *reg; Modified: trunk/uClibc/test/malloc/realloc-can-shrink.c =================================================================== --- trunk/uClibc/test/malloc/realloc-can-shrink.c 2007-05-03 22:57:56 UTC (rev 18552) +++ trunk/uClibc/test/malloc/realloc-can-shrink.c 2007-05-03 23:13:04 UTC (rev 18553) @@ -4,7 +4,7 @@ #define LARGE_BUFFER (1 << 20) /* idea is to span a lot of pages */ -int main() +int main(int argc, char *argv[]) { int count = 20; char *ptr = NULL; From aldot at uclibc.org Fri May 4 07:13:18 2007 From: aldot at uclibc.org (aldot at uclibc.org) Date: Fri, 4 May 2007 07:13:18 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/stdlib Message-ID: <20070504141318.DEC5848074@busybox.net> Author: aldot Date: 2007-05-04 07:13:17 -0700 (Fri, 04 May 2007) New Revision: 18556 Log: - commentary typo fix Modified: trunk/uClibc/libc/stdlib/_atexit.c Changeset: Modified: trunk/uClibc/libc/stdlib/_atexit.c =================================================================== --- trunk/uClibc/libc/stdlib/_atexit.c 2007-05-04 13:07:27 UTC (rev 18555) +++ trunk/uClibc/libc/stdlib/_atexit.c 2007-05-04 14:13:17 UTC (rev 18556) @@ -112,7 +112,7 @@ { /* * glibc casts aefuncp to cxaefuncp. - * This seems dodgy, but I guess callling a function with more + * This seems dodgy, but I guess calling a function with more * parameters than it needs will work everywhere? */ return __cxa_atexit((cxaefuncp)func, NULL, From vapier at uclibc.org Sun May 6 02:18:40 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Sun, 6 May 2007 02:18:40 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/misc/internals Message-ID: <20070506091840.41CB848012@busybox.net> Author: vapier Date: 2007-05-06 02:18:39 -0700 (Sun, 06 May 2007) New Revision: 18563 Log: Nickolai Zeldovich writes: if the temp name already exists, then the retry code does not create a new temp name as the code to do so is outside of the retry loop Modified: trunk/uClibc/libc/misc/internals/tempname.c Changeset: Modified: trunk/uClibc/libc/misc/internals/tempname.c =================================================================== --- trunk/uClibc/libc/misc/internals/tempname.c 2007-05-06 01:37:21 UTC (rev 18562) +++ trunk/uClibc/libc/misc/internals/tempname.c 2007-05-06 09:18:39 UTC (rev 18563) @@ -206,18 +206,17 @@ return -1; } - /* Get some random data. */ - if (fillrand(randomness, sizeof(randomness)) != sizeof(randomness)) { - /* if random device nodes failed us, lets use the braindamaged ver */ - brain_damaged_fillrand(randomness, sizeof(randomness)); - } - - for (i = 0; i < sizeof(randomness); ++i) - XXXXXX[i] = letters[(randomness[i]) % NUM_LETTERS]; - for (i = 0; i < TMP_MAX; ++i) { + int j; + /* Get some random data. */ + if (fillrand(randomness, sizeof(randomness)) != sizeof(randomness)) { + /* if random device nodes failed us, lets use the braindamaged ver */ + brain_damaged_fillrand(randomness, sizeof(randomness)); + } + for (j = 0; j < sizeof(randomness); ++j) + XXXXXX[j] = letters[randomness[j] % NUM_LETTERS]; - switch(kind) { + switch (kind) { case __GT_NOCREATE: { struct stat st; From vapier at uclibc.org Sun May 6 03:49:25 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Sun, 6 May 2007 03:49:25 -0700 (PDT) Subject: svn commit: branches branches/uClibc_0_9_29/libc/mis etc... Message-ID: <20070506104925.E540648085@busybox.net> Author: vapier Date: 2007-05-06 03:49:22 -0700 (Sun, 06 May 2007) New Revision: 18564 Log: tag/branch 0.9.29 Added: branches/uClibc_0_9_29/ branches/uClibc_0_9_29/libc/misc/internals/tempname.c tags/uClibc_0_9_29/ tags/uClibc_0_9_29/libc/misc/internals/tempname.c Removed: branches/uClibc_0_9_29/libc/misc/internals/tempname.c tags/uClibc_0_9_29/libc/misc/internals/tempname.c Changeset: Sorry, the patch is too large to include (1081 lines). Please use ViewCVS to see it! http://uclibc.org/cgi-bin/viewcvs.cgi?view=rev&root=svn&rev=18564 From bugs at busybox.net Wed May 9 13:25:15 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Wed, 9 May 2007 13:25:15 -0700 Subject: [uClibc 0001303]: mmap: unsigned shift operation => overflow error Message-ID: <5063e7197f56aac21e69e02e0b55e7eb@bugs.uclibc.org> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1303 ====================================================================== Reported By: anlo Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1303 Category: Architecture Specific Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 04-05-2007 01:47 PDT Last Modified: 05-09-2007 13:25 PDT ====================================================================== Summary: mmap: unsigned shift operation => overflow error Description: Product version: 0.9.29 (2007-04-02) When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap returns -EOVERFLOW. After some investigation, I have found the cause in uClibc/libc/sysdeps/linux/arm/mmap.c: Since off_t is defined as a long int and the sign bit is set in the address, the shift operation at line 45 (see below) shifts in ones instead of zeroes from the left. This results the offset sent to the kernel function becomes 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12. (off_t) (offset >> MMAP2_PAGE_SHIFT) Proposed change, since the kernel function (do_mmap) expects offset as unsigned long: ((unsigned long) offset >> MMAP2_PAGE_SHIFT) ====================================================================== ---------------------------------------------------------------------- khem - 05-09-07 13:25 ---------------------------------------------------------------------- Yes this should fix the problem. I verified it. However the same fix needs to be applied to ./libc/sysdeps/linux/common/mmap64.c as well Issue History Date Modified Username Field Change ====================================================================== 04-05-07 01:47 anlo New Issue 04-05-07 01:47 anlo Status new => assigned 04-05-07 01:47 anlo Assigned To => uClibc 04-05-07 01:50 anlo Issue Monitored: anlo 05-09-07 13:25 khem Note Added: 0002350 ====================================================================== From bugs at busybox.net Thu May 10 07:50:16 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 10 May 2007 07:50:16 -0700 Subject: [uClibc 0001263]: Daylight Saving Time (DST) doesn't end at the correct time for the US Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1263 ====================================================================== Reported By: mikevoyt Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1263 Category: Standards Compliance Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 03-07-2007 11:55 PST Last Modified: 05-10-2007 07:50 PDT ====================================================================== Summary: Daylight Saving Time (DST) doesn't end at the correct time for the US Description: There are new rules in 2007 for Daylight Saving Time. Daylight Saving Time for 2007 beings at 2AM on 3/11, and ends at 2AM on 11/4. uClibc will start DST at the correct date/time; but it will not end at the correct time. The following test case illustrates the bug: # date -u -s 031109592007 ; date ; sleep 70 ; date Sun Mar 11 09:59:00 UTC 2007 Sun Mar 11 01:59:00 PST 2007 Sun Mar 11 03:00:10 PDT 2007 <---- GOOD: jumps an hour ahead # date -u -s 110409592007 ; date ; sleep 70 ; date Sun Nov 4 09:59:00 UTC 2007 Sun Nov 4 01:59:00 PST 2007 Sun Nov 4 02:00:10 PST 2007 <----- BAD: it should be 1:00:10 !!! ====================================================================== ---------------------------------------------------------------------- lubek - 05-10-07 07:50 ---------------------------------------------------------------------- Interestingly, the error occurs only when setting the date with -u: export TZ="PST8PDT"; date -s 110401592007; date; sleep 70; date Sun Nov 4 01:59:00 PDT 2007 Sun Nov 4 01:59:00 PDT 2007 Sun Nov 4 01:00:10 PST 2007 The short TZ form was used to show that the new rules are in effect. Issue History Date Modified Username Field Change ====================================================================== 03-07-07 11:55 mikevoyt New Issue 03-07-07 11:55 mikevoyt Status new => assigned 03-07-07 11:55 mikevoyt Assigned To => uClibc 05-10-07 07:50 lubek Note Added: 0002353 ====================================================================== From bugs at busybox.net Mon May 14 04:36:19 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 14 May 2007 04:36:19 -0700 Subject: [uClibc 0001345]: uClibc fails to mmap shared libraries with CONFIG_PAGE_SIZE_16KB set in kernel Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1345 ====================================================================== Reported By: redhatter Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1345 Category: Architecture Specific Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 05-13-2007 17:40 PDT Last Modified: 05-14-2007 04:36 PDT ====================================================================== Summary: uClibc fails to mmap shared libraries with CONFIG_PAGE_SIZE_16KB set in kernel Description: Hi... Recently I started building some uClibc userland environments for a mipsel target. My build host is a Lemote Fulong miniPC running a Loongson2E processor (subset MIPS-3), and I've also been doing testing with a Cobalt Qube2 (MIPS-4). Everything builds fine, however, when I try to chroot in on the Loongson, I get told uClibc "can't map" the libraries. However, when I rsync this chroot across to the Qube2, everything works fine. It would appear that uClibc's ld.so assumes the kernel uses a page size of 4KB (0x1000). When it specifies an offset of 0x3000, this works fine on a kernel with a 4KB page size, since 3?1000h=3000h. However, this fails when the kernel has a 16KB page size (0x4000), since 0x3000 is not a multiple of 0x4000. Presumably it'll fail when 64KB pages are in use too. ====================================================================== ---------------------------------------------------------------------- redhatter - 05-13-07 17:42 ---------------------------------------------------------------------- Whoops, this was _meant_ for the uClibc project, not buildroot. Can this be reassigned please? ---------------------------------------------------------------------- bernhardf - 05-14-07 00:44 ---------------------------------------------------------------------- reassigning upon request. If this report is really about 0.9.27, then i suggest you retry with 0.9.29 or trunk and follow up. ---------------------------------------------------------------------- redhatter - 05-14-07 04:36 ---------------------------------------------------------------------- It's about 0.9.28, I'm yet to try 0.9.29 (I've been using the ebuilds in the Gentoo portage tree). I've also just discovered that the Loongson machines won't run with a page size of 4KB, they require a 16KB page size, thus the linker will need to be fixed. I notice in ldso/ldso/mips/dl-sysdep.h, the following #defines are present: /* 4096 bytes alignment */ #define PAGE_ALIGN 0xfffff000 #define ADDR_ALIGN 0xfff #define OFFS_ALIGN 0x7ffff000 I presume these are what need to be tweaked? Has this part changed wildly since 0.9.28? Issue History Date Modified Username Field Change ====================================================================== 05-13-07 17:40 redhatter New Issue 05-13-07 17:40 redhatter Status new => assigned 05-13-07 17:40 redhatter Assigned To => buildroot 05-13-07 17:42 redhatter Note Added: 0002354 05-14-07 00:15 jacmet Project buildroot => uClibc 05-14-07 00:44 bernhardf Note Added: 0002355 05-14-07 00:44 bernhardf Assigned To buildroot => uClibc 05-14-07 04:36 redhatter Note Added: 0002356 ====================================================================== From kraj at uclibc.org Mon May 14 17:35:01 2007 From: kraj at uclibc.org (kraj at uclibc.org) Date: Mon, 14 May 2007 17:35:01 -0700 (PDT) Subject: svn commit: trunk/uClibc/libpthread/linuxthreads/sysdeps/i386 Message-ID: <20070515003501.ED6204800E@busybox.net> Author: kraj Date: 2007-05-14 17:35:00 -0700 (Mon, 14 May 2007) New Revision: 18615 Log: Remove preprocessor warning due to missing definition of USE_TLS Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/useldt.h Changeset: Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/useldt.h =================================================================== --- trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/useldt.h 2007-05-14 22:09:52 UTC (rev 18614) +++ trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/useldt.h 2007-05-15 00:35:00 UTC (rev 18615) @@ -87,7 +87,7 @@ because we inherited the value set up in the main thread by TLS setup. We need to extract that value and set up the same segment in this thread. */ -#if USE_TLS +#if defined (USE_TLS) && USE_TLS # define DO_SET_THREAD_AREA_REUSE(nr) 1 #else /* Without TLS, we do the initialization of the main thread, where NR == 0. */ From kraj at uclibc.org Mon May 14 17:37:02 2007 From: kraj at uclibc.org (kraj at uclibc.org) Date: Mon, 14 May 2007 17:37:02 -0700 (PDT) Subject: svn commit: trunk/uClibc: libc/sysdeps/linux/arm libc/sysdeps/linu etc... Message-ID: <20070515003702.D3FC548011@busybox.net> Author: kraj Date: 2007-05-14 17:37:02 -0700 (Mon, 14 May 2007) New Revision: 18616 Log: Fix arm mmap when using mmap2 syscall. Fixes bug #1303 Added: trunk/uClibc/test/mmap/mmap2.c Modified: trunk/uClibc/libc/sysdeps/linux/arm/mmap.c trunk/uClibc/libc/sysdeps/linux/common/mmap64.c Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/arm/mmap.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/arm/mmap.c 2007-05-15 00:35:00 UTC (rev 18615) +++ trunk/uClibc/libc/sysdeps/linux/arm/mmap.c 2007-05-15 00:37:02 UTC (rev 18616) @@ -27,7 +27,6 @@ #elif defined (__NR_mmap2) #define __NR__mmap __NR_mmap2 - #ifndef MMAP2_PAGE_SHIFT # define MMAP2_PAGE_SHIFT 12 #endif @@ -39,9 +38,17 @@ { /* check if offset is page aligned */ if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) + { + __set_errno(EINVAL); return MAP_FAILED; + } +#ifdef __USE_FILE_OFFSET64 return (__ptr_t) _mmap (addr, len, prot, flags, - fd,(off_t) (offset >> MMAP2_PAGE_SHIFT)); + fd,((__u_quad_t) offset >> MMAP2_PAGE_SHIFT)); +#else + return (__ptr_t) _mmap (addr, len, prot, flags, + fd,((__u_long) offset >> MMAP2_PAGE_SHIFT)); +#endif } #elif defined (__NR_mmap) # define __NR__mmap __NR_mmap Modified: trunk/uClibc/libc/sysdeps/linux/common/mmap64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/mmap64.c 2007-05-15 00:35:00 UTC (rev 18615) +++ trunk/uClibc/libc/sysdeps/linux/common/mmap64.c 2007-05-15 00:37:02 UTC (rev 18616) @@ -58,8 +58,13 @@ __set_errno(EINVAL); return MAP_FAILED; } - - return __syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)); +#ifdef __USE_FILE_OFFSET64 + return __syscall_mmap2(addr, len, prot, flags, + fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT)); +#else + return __syscall_mmap2(addr, len, prot, flags, + fd,((__ulong_t)offset >> MMAP2_PAGE_SHIFT)); +#endif } # endif Added: trunk/uClibc/test/mmap/mmap2.c =================================================================== --- trunk/uClibc/test/mmap/mmap2.c (rev 0) +++ trunk/uClibc/test/mmap/mmap2.c 2007-05-15 00:37:02 UTC (rev 18616) @@ -0,0 +1,41 @@ +/* When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap + * returns -EOVERFLOW. + * + * Since off_t is defined as a long int and the sign bit is set in the address, + * the shift operation shifts in ones instead of zeroes + * from the left. This results the offset sent to the kernel function becomes + * 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \ + __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0) + +#define MAP_SIZE 4096UL +#define MAP_MASK (MAP_SIZE - 1) + +int main(int argc, char **argv) { + void* map_base = 0; + int fd; + off_t target = 0xfffff000; + if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL; + printf("/dev/mem opened.\n"); + fflush(stdout); + + /* Map one page */ + map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + fd, target & ~MAP_MASK); + if(map_base == (void *) -1) FATAL; + printf("Memory mapped at address %p.\n", map_base); + fflush(stdout); + if(munmap(map_base, MAP_SIZE) == -1) FATAL; + close(fd); + return 0; +} From bugs at busybox.net Mon May 14 17:40:48 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 14 May 2007 17:40:48 -0700 Subject: [uClibc 0001303]: mmap: unsigned shift operation => overflow error Message-ID: <184cb1c501151243af4ca7abb28e56d5@bugs.uclibc.org> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1303 ====================================================================== Reported By: anlo Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1303 Category: Architecture Specific Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 04-05-2007 01:47 PDT Last Modified: 05-14-2007 17:40 PDT ====================================================================== Summary: mmap: unsigned shift operation => overflow error Description: Product version: 0.9.29 (2007-04-02) When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap returns -EOVERFLOW. After some investigation, I have found the cause in uClibc/libc/sysdeps/linux/arm/mmap.c: Since off_t is defined as a long int and the sign bit is set in the address, the shift operation at line 45 (see below) shifts in ones instead of zeroes from the left. This results the offset sent to the kernel function becomes 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12. (off_t) (offset >> MMAP2_PAGE_SHIFT) Proposed change, since the kernel function (do_mmap) expects offset as unsigned long: ((unsigned long) offset >> MMAP2_PAGE_SHIFT) ====================================================================== ---------------------------------------------------------------------- khem - 05-09-07 13:25 ---------------------------------------------------------------------- Yes this should fix the problem. I verified it. However the same fix needs to be applied to ./libc/sysdeps/linux/common/mmap64.c as well ---------------------------------------------------------------------- khem - 05-14-07 17:40 ---------------------------------------------------------------------- A patch which fixes this problem has been installed on trunk. Please verify with the latest trunk. here is the patch as applied. http://uclibc.org/lists/uclibc-cvs/2007-May/011360.html Issue History Date Modified Username Field Change ====================================================================== 04-05-07 01:47 anlo New Issue 04-05-07 01:47 anlo Status new => assigned 04-05-07 01:47 anlo Assigned To => uClibc 04-05-07 01:50 anlo Issue Monitored: anlo 05-09-07 13:25 khem Note Added: 0002350 05-14-07 17:40 khem Note Added: 0002358 ====================================================================== From pkj at uclibc.org Tue May 15 04:58:38 2007 From: pkj at uclibc.org (pkj at uclibc.org) Date: Tue, 15 May 2007 04:58:38 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/common Message-ID: <20070515115838.9056848075@busybox.net> Author: pkj Date: 2007-05-15 04:58:37 -0700 (Tue, 15 May 2007) New Revision: 18627 Log: Made it compile again. Modified: trunk/uClibc/libc/sysdeps/linux/common/mmap64.c Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/common/mmap64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/mmap64.c 2007-05-15 11:39:44 UTC (rev 18626) +++ trunk/uClibc/libc/sysdeps/linux/common/mmap64.c 2007-05-15 11:58:37 UTC (rev 18627) @@ -63,7 +63,7 @@ fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT)); #else return __syscall_mmap2(addr, len, prot, flags, - fd,((__ulong_t)offset >> MMAP2_PAGE_SHIFT)); + fd,((__u_long)offset >> MMAP2_PAGE_SHIFT)); #endif } From pkj at uclibc.org Tue May 15 05:05:09 2007 From: pkj at uclibc.org (pkj at uclibc.org) Date: Tue, 15 May 2007 05:05:09 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux: arm common Message-ID: <20070515120509.0156248087@busybox.net> Author: pkj Date: 2007-05-15 05:05:06 -0700 (Tue, 15 May 2007) New Revision: 18628 Log: Restored indentation. Modified: trunk/uClibc/libc/sysdeps/linux/arm/mmap.c trunk/uClibc/libc/sysdeps/linux/common/mmap64.c Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/arm/mmap.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/arm/mmap.c 2007-05-15 11:58:37 UTC (rev 18627) +++ trunk/uClibc/libc/sysdeps/linux/arm/mmap.c 2007-05-15 12:05:06 UTC (rev 18628) @@ -27,6 +27,7 @@ #elif defined (__NR_mmap2) #define __NR__mmap __NR_mmap2 + #ifndef MMAP2_PAGE_SHIFT # define MMAP2_PAGE_SHIFT 12 #endif @@ -43,11 +44,11 @@ return MAP_FAILED; } #ifdef __USE_FILE_OFFSET64 - return (__ptr_t) _mmap (addr, len, prot, flags, - fd,((__u_quad_t) offset >> MMAP2_PAGE_SHIFT)); + return (__ptr_t) _mmap (addr, len, prot, flags, + fd, ((__u_quad_t) offset >> MMAP2_PAGE_SHIFT)); #else - return (__ptr_t) _mmap (addr, len, prot, flags, - fd,((__u_long) offset >> MMAP2_PAGE_SHIFT)); + return (__ptr_t) _mmap (addr, len, prot, flags, + fd, ((__u_long) offset >> MMAP2_PAGE_SHIFT)); #endif } #elif defined (__NR_mmap) Modified: trunk/uClibc/libc/sysdeps/linux/common/mmap64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/mmap64.c 2007-05-15 11:58:37 UTC (rev 18627) +++ trunk/uClibc/libc/sysdeps/linux/common/mmap64.c 2007-05-15 12:05:06 UTC (rev 18628) @@ -58,13 +58,14 @@ __set_errno(EINVAL); return MAP_FAILED; } -#ifdef __USE_FILE_OFFSET64 - return __syscall_mmap2(addr, len, prot, flags, - fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT)); -#else - return __syscall_mmap2(addr, len, prot, flags, - fd,((__u_long)offset >> MMAP2_PAGE_SHIFT)); -#endif + +# ifdef __USE_FILE_OFFSET64 + return __syscall_mmap2(addr, len, prot, flags, + fd, ((__u_quad_t) offset >> MMAP2_PAGE_SHIFT)); +# else + return __syscall_mmap2(addr, len, prot, flags, + fd, ((__u_long) offset >> MMAP2_PAGE_SHIFT)); +# endif } # endif From bugs at busybox.net Wed May 16 01:49:08 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Wed, 16 May 2007 01:49:08 -0700 Subject: [uClibc 0001349]: Error: weak declaration of `__EI_sigaction' must precede definition Message-ID: <8118a11ecdd9dad0ac1de00d384b57e4@busybox.net> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=1349 ====================================================================== Reported By: zhy2111314 Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1349 Category: Architecture Specific Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 05-16-2007 01:49 PDT Last Modified: 05-16-2007 01:49 PDT ====================================================================== Summary: Error: weak declaration of `__EI_sigaction' must precede definition Description: While I used uClibc-0.9.29 and after I "make CROSS=arm-linux- menuconfig" and I executed "make CROSS=arm-linux-", then I got the following error, I cannot find any information from the World Wide Web :( And the attateched file is my .config. ./extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h make[2]: `conf' is up to date. CC libc/sysdeps/linux/arm/sigaction.os libc/sysdeps/linux/arm/sigaction.c:125: weak declaration of `__EI_sigaction' must precede definition make[1]: *** [libc/sysdeps/linux/arm/sigaction.os] Error 1 make: *** [lib/libc.so.0] Error 2 advTHANKSance. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 05-16-07 01:49 zhy2111314 New Issue 05-16-07 01:49 zhy2111314 Status new => assigned 05-16-07 01:49 zhy2111314 Assigned To => uClibc 05-16-07 01:49 zhy2111314 File Added: myuClibc.config ====================================================================== From bugs at busybox.net Fri May 18 23:20:46 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 18 May 2007 23:20:46 -0700 Subject: [uClibc 0001349]: Error: weak declaration of `__EI_sigaction' must precede definition Message-ID: <92d2baeacb98104117dd74f44ca1a015@bugs.busybox.net> The following issue has been CLOSED ====================================================================== http://busybox.net/bugs/view.php?id=1349 ====================================================================== Reported By: zhy2111314 Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1349 Category: Architecture Specific Reproducibility: always Severity: minor Priority: normal Status: closed Resolution: won't fix Fixed in Version: ====================================================================== Date Submitted: 05-16-2007 01:49 PDT Last Modified: 05-18-2007 23:20 PDT ====================================================================== Summary: Error: weak declaration of `__EI_sigaction' must precede definition Description: While I used uClibc-0.9.29 and after I "make CROSS=arm-linux- menuconfig" and I executed "make CROSS=arm-linux-", then I got the following error, I cannot find any information from the World Wide Web :( And the attateched file is my .config. ./extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h make[2]: `conf' is up to date. CC libc/sysdeps/linux/arm/sigaction.os libc/sysdeps/linux/arm/sigaction.c:125: weak declaration of `__EI_sigaction' must precede definition make[1]: *** [libc/sysdeps/linux/arm/sigaction.os] Error 1 make: *** [lib/libc.so.0] Error 2 advTHANKSance. ====================================================================== ---------------------------------------------------------------------- vapier - 05-18-07 23:20 ---------------------------------------------------------------------- builds fine for me with gcc-4.x re-open if upgrading your compiler doesnt fix things or you can determine this isnt gcc-2.x sucking (with a good patch) Issue History Date Modified Username Field Change ====================================================================== 05-16-07 01:49 zhy2111314 New Issue 05-16-07 01:49 zhy2111314 Status new => assigned 05-16-07 01:49 zhy2111314 Assigned To => uClibc 05-16-07 01:49 zhy2111314 File Added: myuClibc.config 05-18-07 23:20 vapier Note Added: 0002378 05-18-07 23:20 vapier Status assigned => closed 05-18-07 23:20 vapier Resolution open => won't fix ====================================================================== From bugs at busybox.net Sun May 20 16:48:14 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 20 May 2007 16:48:14 -0700 Subject: [uClibc 0001359]: upstart can not be compiled with uclibc Message-ID: <78bbb3075b3f1508e499fc31ed866b4e@busybox.net> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=1359 ====================================================================== Reported By: quitte Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1359 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 05-20-2007 16:48 PDT Last Modified: 05-20-2007 16:48 PDT ====================================================================== Summary: upstart can not be compiled with uclibc Description: I had a discussion on irc with one of the upstart developers. I hardly understand theissue, so I'm pasting: now I'm getting undefined reference to `inotify_add_watch. do you happen to know what is missing in uclibc for that,too? sys/inotify.h you need the functions in your uclibc as well as the headers ...here I found out that some inotify support is in uclibc and told the developer the kernel headers are in place,too. yeah, you still need the stub functions though.the header declares the existance of the function, but not the function.you can probably just copy the syscall stuff into a header and inline it. like nih/inotify.h does ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 05-20-07 16:48 quitte New Issue 05-20-07 16:48 quitte Status new => assigned 05-20-07 16:48 quitte Assigned To => uClibc ====================================================================== From bugs at busybox.net Sun May 20 16:58:25 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 20 May 2007 16:58:25 -0700 Subject: [uClibc 0001359]: upstart can not be compiled with uclibc Message-ID: The following issue has been CLOSED ====================================================================== http://busybox.net/bugs/view.php?id=1359 ====================================================================== Reported By: quitte Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1359 Category: Other Reproducibility: always Severity: minor Priority: normal Status: closed Resolution: unable to reproduce Fixed in Version: ====================================================================== Date Submitted: 05-20-2007 16:48 PDT Last Modified: 05-20-2007 16:58 PDT ====================================================================== Summary: upstart can not be compiled with uclibc Description: I had a discussion on irc with one of the upstart developers. I hardly understand theissue, so I'm pasting: now I'm getting undefined reference to `inotify_add_watch. do you happen to know what is missing in uclibc for that,too? sys/inotify.h you need the functions in your uclibc as well as the headers ...here I found out that some inotify support is in uclibc and told the developer the kernel headers are in place,too. yeah, you still need the stub functions though.the header declares the existance of the function, but not the function.you can probably just copy the syscall stuff into a header and inline it. like nih/inotify.h does ====================================================================== ---------------------------------------------------------------------- vapier - 05-20-07 16:58 ---------------------------------------------------------------------- inotify_add_watch is added to the libc if your kernel headers provide __NR_inotify_add_watch Issue History Date Modified Username Field Change ====================================================================== 05-20-07 16:48 quitte New Issue 05-20-07 16:48 quitte Status new => assigned 05-20-07 16:48 quitte Assigned To => uClibc 05-20-07 16:58 vapier Note Added: 0002391 05-20-07 16:58 vapier Status assigned => closed 05-20-07 16:58 vapier Resolution open => unable to reproduce 05-20-07 16:58 vapier Description Updated ====================================================================== From bugs at busybox.net Mon May 21 04:53:47 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 21 May 2007 04:53:47 -0700 Subject: [uClibc 0001360]: check-lxdialog.sh: invalid operator Message-ID: The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=1360 ====================================================================== Reported By: razzor Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1360 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 05-21-2007 04:53 PDT Last Modified: 05-21-2007 04:53 PDT ====================================================================== Summary: check-lxdialog.sh: invalid operator Description: uClibc/extra/config/lxdialog/check-lxdialog.sh is a /bin/sh script, so "==" is a invalid operator. I'm building under Ubuntu, which uses dash as /bin/sh. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 05-21-07 04:53 razzor New Issue 05-21-07 04:53 razzor Status new => assigned 05-21-07 04:53 razzor Assigned To => uClibc 05-21-07 04:53 razzor File Added: check-lxdialog.patch ====================================================================== From bugs at busybox.net Mon May 21 05:39:45 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 21 May 2007 05:39:45 -0700 Subject: [uClibc 0001361]: gethostbyname() fails to resolve into more than 23 addresses Message-ID: The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=1361 ====================================================================== Reported By: vvv Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1361 Category: Architecture Specific Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 05-21-2007 05:39 PDT Last Modified: 05-21-2007 05:39 PDT ====================================================================== Summary: gethostbyname() fails to resolve into more than 23 addresses Description: If DNS returns more than 23 IP addresses for a host name, then gethostbyname() fails - does not return the struct hostent and does not set error either. En example of such hostname is vpn.corbina.net. As of today, it returns 24 IP addresses. Some time ago there were 26 addresses. The problem exists in uClibc 0.9.28.1-0.9.28.3 (and probably 0.9.29). gethostbyname() of version 0.9.26 always returned only one address and was not dependent on number of IPs returned by DNS. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 05-21-07 05:39 vvv New Issue 05-21-07 05:39 vvv Status new => assigned 05-21-07 05:39 vvv Assigned To => uClibc 05-21-07 05:39 vvv File Added: resolv.patch ====================================================================== From bugs at busybox.net Mon May 21 05:45:03 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 21 May 2007 05:45:03 -0700 Subject: [uClibc 0001361]: gethostbyname() fails to resolve into more than 23 addresses Message-ID: <45aba7be2b2c24ce249a19b090dc2314@bugs.uclibc.org> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1361 ====================================================================== Reported By: vvv Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1361 Category: Architecture Specific Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 05-21-2007 05:39 PDT Last Modified: 05-21-2007 05:45 PDT ====================================================================== Summary: gethostbyname() fails to resolve into more than 23 addresses Description: If DNS returns more than 23 IP addresses for a host name, then gethostbyname() fails - does not return the struct hostent and does not set error either. En example of such hostname is vpn.corbina.net. As of today, it returns 24 IP addresses. Some time ago there were 26 addresses. The problem exists in uClibc 0.9.28.1-0.9.28.3 (and probably 0.9.29). gethostbyname() of version 0.9.26 always returned only one address and was not dependent on number of IPs returned by DNS. ====================================================================== ---------------------------------------------------------------------- vvv - 05-21-07 05:45 ---------------------------------------------------------------------- Sorry, the issue is not architecture specific. Issue History Date Modified Username Field Change ====================================================================== 05-21-07 05:39 vvv New Issue 05-21-07 05:39 vvv Status new => assigned 05-21-07 05:39 vvv Assigned To => uClibc 05-21-07 05:39 vvv File Added: resolv.patch 05-21-07 05:42 vvv Issue Monitored: vvv 05-21-07 05:45 vvv Note Added: 0002392 ====================================================================== From sjhill at uclibc.org Wed May 23 19:57:00 2007 From: sjhill at uclibc.org (sjhill at uclibc.org) Date: Wed, 23 May 2007 19:57:00 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/arm Message-ID: <20070524025700.AFB7448081@busybox.net> Author: sjhill Date: 2007-05-23 19:56:59 -0700 (Wed, 23 May 2007) New Revision: 18676 Log: Fix ARM EABI signal unwinding to accomodate signal frame layout between Linux kernel versions as reported by Joseph S. Myers on the mailing list. More information available at . Modified: trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S =================================================================== --- trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S 2007-05-23 15:41:48 UTC (rev 18675) +++ trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S 2007-05-24 02:56:59 UTC (rev 18676) @@ -17,7 +17,8 @@ 02111-1307 USA. */ #include - +#include + /* If no SA_RESTORER function was specified by the application we use one of these. This avoids the need for the kernel to synthesise a return instruction on the stack, which would involve expensive cache flushes. @@ -29,15 +30,21 @@ Start the unwind tables at least one instruction before the signal trampoline, because the unwinder will assume we are returning after - a call site. */ + a call site. + The signal frame layout changed in 2.6.18. */ + .global __default_sa_restorer .type __default_sa_restorer,%function .align 2 #ifdef __ARM_EABI__ .fnstart .save {r0-r15} +#if LINUX_VERSION_CODE >= 0x020612 + .pad #32 +#else .pad #12 +#endif nop __default_sa_restorer: mov r7, $SYS_ify(sigreturn) @@ -57,7 +64,11 @@ #ifdef __ARM_EABI__ .fnstart .save {r0-r15} +#if LINUX_VERSION_CODE >= 0x020612 + .pad #160 +#else .pad #168 +#endif nop __default_rt_sa_restorer: mov r7, $SYS_ify(rt_sigreturn) From sjhill at uclibc.org Wed May 23 20:00:09 2007 From: sjhill at uclibc.org (sjhill at uclibc.org) Date: Wed, 23 May 2007 20:00:09 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/mips Message-ID: <20070524030009.07FBB48081@busybox.net> Author: sjhill Date: 2007-05-23 20:00:08 -0700 (Wed, 23 May 2007) New Revision: 18677 Log: Fix MIPS syscall() and pipe functions to set errno correctly as reported by Daniel Jacobowitz on the mailing list. More information available at . Modified: trunk/uClibc/libc/sysdeps/linux/mips/pipe.S trunk/uClibc/libc/sysdeps/linux/mips/syscall.S Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/mips/pipe.S =================================================================== --- trunk/uClibc/libc/sysdeps/linux/mips/pipe.S 2007-05-24 02:56:59 UTC (rev 18676) +++ trunk/uClibc/libc/sysdeps/linux/mips/pipe.S 2007-05-24 03:00:08 UTC (rev 18677) @@ -17,7 +17,16 @@ pipe: li v0,__NR_pipe syscall - beqz a3, 1f + bnez a3, 1f + sw v0, 0(a0) + sw v1, 4(a0) + li v0, 0 + j ra +1: + /* uClibc change -- start */ + move a0,v0 /* Pass return val to C function. */ + /* uClibc change -- stop */ + #ifdef __PIC__ PTR_LA t9, __syscall_error jr t9 @@ -25,10 +34,6 @@ j __syscall_error #endif 1: - sw v0, 0(a0) - sw v1, 4(a0) - li v0, 0 - j ra .end pipe .size pipe,.-pipe libc_hidden_def(pipe) Modified: trunk/uClibc/libc/sysdeps/linux/mips/syscall.S =================================================================== --- trunk/uClibc/libc/sysdeps/linux/mips/syscall.S 2007-05-24 02:56:59 UTC (rev 18676) +++ trunk/uClibc/libc/sysdeps/linux/mips/syscall.S 2007-05-24 03:00:08 UTC (rev 18677) @@ -60,6 +60,16 @@ #else addiu sp,sp,32 #endif + bnez a3, 1f j ra /* Return to caller. */ +1: + move a0,v0 /* Pass return val to C function. */ + +#ifdef __PIC__ + PTR_LA t9, __syscall_error + jr t9 +#else + j __syscall_error +#endif .end syscall .size syscall,.-syscall From vapier at uclibc.org Wed May 23 21:37:21 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Wed, 23 May 2007 21:37:21 -0700 (PDT) Subject: svn commit: trunk/uClibc/extra/config/lxdialog Message-ID: <20070524043721.D70444801C@busybox.net> Author: vapier Date: 2007-05-23 21:37:20 -0700 (Wed, 23 May 2007) New Revision: 18678 Log: use POSIX -eq rather than bash == #1360 Modified: trunk/uClibc/extra/config/lxdialog/check-lxdialog.sh Changeset: Modified: trunk/uClibc/extra/config/lxdialog/check-lxdialog.sh =================================================================== --- trunk/uClibc/extra/config/lxdialog/check-lxdialog.sh 2007-05-24 03:00:08 UTC (rev 18677) +++ trunk/uClibc/extra/config/lxdialog/check-lxdialog.sh 2007-05-24 04:37:20 UTC (rev 18678) @@ -57,7 +57,7 @@ printf "Usage: $0 [-check compiler options|-header|-library]\n" } -if [ $# == 0 ]; then +if [ $# -eq 0 ]; then usage exit 1 fi From bugs at busybox.net Wed May 23 21:37:53 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Wed, 23 May 2007 21:37:53 -0700 Subject: [uClibc 0001360]: check-lxdialog.sh: invalid operator Message-ID: The following issue has been CLOSED ====================================================================== http://busybox.net/bugs/view.php?id=1360 ====================================================================== Reported By: razzor Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1360 Category: Other Reproducibility: always Severity: minor Priority: normal Status: closed Resolution: fixed Fixed in Version: ====================================================================== Date Submitted: 05-21-2007 04:53 PDT Last Modified: 05-23-2007 21:37 PDT ====================================================================== Summary: check-lxdialog.sh: invalid operator Description: uClibc/extra/config/lxdialog/check-lxdialog.sh is a /bin/sh script, so "==" is a invalid operator. I'm building under Ubuntu, which uses dash as /bin/sh. ====================================================================== ---------------------------------------------------------------------- vapier - 05-23-07 21:37 ---------------------------------------------------------------------- fixed in svn and pushed upstream by using -eq Issue History Date Modified Username Field Change ====================================================================== 05-21-07 04:53 razzor New Issue 05-21-07 04:53 razzor Status new => assigned 05-21-07 04:53 razzor Assigned To => uClibc 05-21-07 04:53 razzor File Added: check-lxdialog.patch 05-23-07 21:37 vapier Note Added: 0002399 05-23-07 21:37 vapier Status assigned => closed 05-23-07 21:37 vapier Resolution open => fixed ====================================================================== From jocke at uclibc.org Fri May 25 11:06:04 2007 From: jocke at uclibc.org (jocke at uclibc.org) Date: Fri, 25 May 2007 11:06:04 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/powerpc Message-ID: <20070525180604.70C1D4855F@busybox.net> Author: jocke Date: 2007-05-25 11:06:02 -0700 (Fri, 25 May 2007) New Revision: 18692 Log: Remove the arch specific mmap impl. for Powerpc. The common one will do. Removed: trunk/uClibc/libc/sysdeps/linux/powerpc/mmap.c Modified: trunk/uClibc/libc/sysdeps/linux/powerpc/Makefile.arch Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/powerpc/Makefile.arch =================================================================== --- trunk/uClibc/libc/sysdeps/linux/powerpc/Makefile.arch 2007-05-25 14:34:30 UTC (rev 18691) +++ trunk/uClibc/libc/sysdeps/linux/powerpc/Makefile.arch 2007-05-25 18:06:02 UTC (rev 18692) @@ -5,7 +5,7 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -CSRC := mmap.c __syscall_error.c pread_write.c ioctl.c +CSRC := __syscall_error.c pread_write.c ioctl.c SSRC := \ __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \ Deleted: trunk/uClibc/libc/sysdeps/linux/powerpc/mmap.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/powerpc/mmap.c 2007-05-25 14:34:30 UTC (rev 18691) +++ trunk/uClibc/libc/sysdeps/linux/powerpc/mmap.c 2007-05-25 18:06:02 UTC (rev 18692) @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2000-2006 Erik Andersen - * - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include -#include -#include -#include - -libc_hidden_proto(mmap) - -#define __syscall_clobbers \ - "r9", "r10", "r11", "r12" -#define __syscall_return(type) \ - return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \ - (type) __sc_ret - -void * mmap(void *start, size_t length, int prot, int flags, int fd, - off_t offset) -{ - unsigned long __sc_ret, __sc_err; - register unsigned long __sc_0 __asm__ ("r0"); - register unsigned long __sc_3 __asm__ ("r3"); - register unsigned long __sc_4 __asm__ ("r4"); - register unsigned long __sc_5 __asm__ ("r5"); - register unsigned long __sc_6 __asm__ ("r6"); - register unsigned long __sc_7 __asm__ ("r7"); - register unsigned long __sc_8 __asm__ ("r8"); - - __sc_3 = (unsigned long) start; - __sc_4 = (unsigned long) length; - __sc_5 = (unsigned long) prot; - __sc_6 = (unsigned long) flags; - __sc_7 = (unsigned long) fd; - __sc_8 = (unsigned long) offset; - __sc_0 = __NR_mmap; - __asm__ __volatile__ - ("sc \n\t" - "mfcr %1 " - : "=&r" (__sc_3), "=&r" (__sc_0) - : "0" (__sc_3), "1" (__sc_0), - "r" (__sc_4), - "r" (__sc_5), - "r" (__sc_6), - "r" (__sc_7), - "r" (__sc_8) - : __syscall_clobbers); - __sc_ret = __sc_3; - __sc_err = __sc_0; - - __syscall_return (void *); -} -libc_hidden_def(mmap) From vapier at uclibc.org Fri May 25 11:34:47 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Fri, 25 May 2007 11:34:47 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/common Message-ID: <20070525183447.DDC8948577@busybox.net> Author: vapier Date: 2007-05-25 11:34:46 -0700 (Fri, 25 May 2007) New Revision: 18693 Log: Jean-Christian de Rivaz writes: I actually suspect this code into the file uClibc/libc/sysdeps/linux/common/poll.c: tval.tv_nsec = (timeout % 1000) *1000; <==== make only usec! From vapier at uclibc.org Thu May 31 01:21:39 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Thu, 31 May 2007 01:21:39 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux: arm common Message-ID: <20070531082139.2E423485B2@busybox.net> Author: vapier Date: 2007-05-31 01:21:38 -0700 (Thu, 31 May 2007) New Revision: 18707 Log: Atsushi Nemoto writes: http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html states it returns error code instead of setting errno. Modified: trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise.c trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise64.c trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise.c trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise.c 2007-05-30 14:48:38 UTC (rev 18706) +++ trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise.c 2007-05-31 08:21:38 UTC (rev 18707) @@ -30,8 +30,7 @@ #else int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused) { - __set_errno(ENOSYS); - return -1; + return ENOSYS; } #endif Modified: trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise64.c 2007-05-30 14:48:38 UTC (rev 18706) +++ trunk/uClibc/libc/sysdeps/linux/arm/posix_fadvise64.c 2007-05-31 08:21:38 UTC (rev 18707) @@ -40,8 +40,7 @@ #else int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise) { - __set_errno(ENOSYS); - return -1; + return ENOSYS; } #endif #endif Modified: trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise.c 2007-05-30 14:48:38 UTC (rev 18706) +++ trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise.c 2007-05-31 08:21:38 UTC (rev 18707) @@ -46,7 +46,6 @@ #else int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused) { - __set_errno(ENOSYS); - return -1; + return ENOSYS; } #endif Modified: trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c 2007-05-30 14:48:38 UTC (rev 18706) +++ trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c 2007-05-31 08:21:38 UTC (rev 18707) @@ -74,8 +74,7 @@ */ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice) { - __set_errno(ENOSYS); - return -1; + return ENOSYS; } #endif /* __NR_fadvise64_64 */ #endif /* __UCLIBC_HAS_LFS__ */ From vapier at uclibc.org Thu May 31 01:22:36 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Thu, 31 May 2007 01:22:36 -0700 (PDT) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/mips Message-ID: <20070531082236.2B698485B7@busybox.net> Author: vapier Date: 2007-05-31 01:22:35 -0700 (Thu, 31 May 2007) New Revision: 18708 Log: Atsushi Nemoto writes: Current MIPS readahead(), posix_fadvise(), posix_fadvise64() do not match with kernel on all ABIs. On O32 ABI, a padding is needed before a long long argument. On N32/N64, a long long argument should be passed via a single register. Added: trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise.c trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise64.c trunk/uClibc/libc/sysdeps/linux/mips/readahead.c Modified: trunk/uClibc/libc/sysdeps/linux/mips/Makefile.arch Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/mips/Makefile.arch =================================================================== --- trunk/uClibc/libc/sysdeps/linux/mips/Makefile.arch 2007-05-31 08:21:38 UTC (rev 18707) +++ trunk/uClibc/libc/sysdeps/linux/mips/Makefile.arch 2007-05-31 08:22:35 UTC (rev 18708) @@ -7,7 +7,8 @@ CSRC := \ __longjmp.c brk.c setjmp_aux.c mmap.c __syscall_error.c \ - cacheflush.c pread_write.c sysmips.c _test_and_set.c sigaction.c + cacheflush.c pread_write.c sysmips.c _test_and_set.c sigaction.c \ + readahead.c posix_fadvise.c posix_fadvise64.c SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S Added: trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise.c (rev 0) +++ trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise.c 2007-05-31 08:22:35 UTC (rev 18708) @@ -0,0 +1,39 @@ +/* vi: set sw=4 ts=4: */ +/* + * posix_fadvise() for MIPS uClibc + * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html + * + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +int posix_fadvise(int fd, off_t offset, off_t len, int advice) +{ +/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */ +#ifdef __NR_fadvise64 + INTERNAL_SYSCALL_DECL(err); +# if _MIPS_SIM == _ABIO32 + int ret = INTERNAL_SYSCALL(fadvise64, err, 7, fd, 0, + __LONG_LONG_PAIR ((long) (offset >> 31), (long) offset), + __LONG_LONG_PAIR ((long) (len >> 31), (long) len), + advice); +# else /* N32 || N64 */ + int ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice); +# endif + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +#else + return ENOSYS; +#endif +} Added: trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise64.c (rev 0) +++ trunk/uClibc/libc/sysdeps/linux/mips/posix_fadvise64.c 2007-05-31 08:22:35 UTC (rev 18708) @@ -0,0 +1,43 @@ +/* vi: set sw=4 ts=4: */ +/* + * posix_fadvise64() for MIPS uClibc + * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html + * + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __UCLIBC_HAS_LFS__ + +int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice) +{ +/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */ +#ifdef __NR_fadvise64 + INTERNAL_SYSCALL_DECL(err); +# if _MIPS_SIM == _MIPS_SIM_ABI32 + int ret = INTERNAL_SYSCALL(fadvise64, err, 7, fd, 0, + __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset), + __LONG_LONG_PAIR ((long) (len >> 32), (long) len), + advice); +# else /* N32 || N64 */ + int ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice); +# endif + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; +#else + return ENOSYS; +#endif +} + +#endif /* __UCLIBC_HAS_LFS__ */ Added: trunk/uClibc/libc/sysdeps/linux/mips/readahead.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/mips/readahead.c (rev 0) +++ trunk/uClibc/libc/sysdeps/linux/mips/readahead.c 2007-05-31 08:22:35 UTC (rev 18708) @@ -0,0 +1,38 @@ +/* Provide kernel hint to read ahead. + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +#ifdef __NR_readahead + +ssize_t readahead(int fd, off64_t offset, size_t count) +{ +# if _MIPS_SIM == _ABIO32 + return INLINE_SYSCALL (readahead, 5, fd, 0, + __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) offset), + count); +# else /* N32 || N64 */ + return INLINE_SYSCALL (readahead, 3, fd, offset, count); +# endif +} + +#endif From vapier at uclibc.org Thu May 31 01:26:29 2007 From: vapier at uclibc.org (vapier at uclibc.org) Date: Thu, 31 May 2007 01:26:29 -0700 (PDT) Subject: svn commit: trunk/uClibc/libpthread/linuxthreads.old Message-ID: <20070531082629.7F52E485C1@busybox.net> Author: vapier Date: 2007-05-31 01:26:29 -0700 (Thu, 31 May 2007) New Revision: 18709 Log: Bernd Schmidt writes: make sure custom stacks work properly for no-mmu Modified: trunk/uClibc/libpthread/linuxthreads.old/manager.c Changeset: Modified: trunk/uClibc/libpthread/linuxthreads.old/manager.c =================================================================== --- trunk/uClibc/libpthread/linuxthreads.old/manager.c 2007-05-31 08:22:35 UTC (rev 18708) +++ trunk/uClibc/libpthread/linuxthreads.old/manager.c 2007-05-31 08:26:29 UTC (rev 18709) @@ -355,6 +355,13 @@ guardaddr = NULL; guardsize = 0; __pthread_nonstandard_stacks = 1; +#ifndef __ARCH_USE_MMU__ + /* check the initial thread stack boundaries so they don't overlap */ + NOMMU_INITIAL_THREAD_BOUNDS((char *) new_thread, (char *) new_thread_bottom); + + PDEBUG("initial stack: bos=%p, tos=%p\n", __pthread_initial_thread_bos, + __pthread_initial_thread_tos); +#endif } else { From bugs at busybox.net Thu May 31 09:25:29 2007 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 31 May 2007 09:25:29 -0700 Subject: [uClibc 0001377]: strtod() doesn't parse DBL_MIN correctly Message-ID: <73e705ae9f709f39f9df72092ee8ce15@busybox.net> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=1377 ====================================================================== Reported By: chmeee Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 1377 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 05-31-2007 09:25 PDT Last Modified: 05-31-2007 09:25 PDT ====================================================================== Summary: strtod() doesn't parse DBL_MIN correctly Description: The strtod() function doesn't parse the DBL_MIN correctly, returning 0.0 as the value, while glibc's strtod() returns it correctly (2.225074e-308). ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 05-31-07 09:25 chmeee New Issue 05-31-07 09:25 chmeee Status new => assigned 05-31-07 09:25 chmeee Assigned To => uClibc ======================================================================