[Bug 1891] New: MIPS: errno variable bugged in ntpl branch

bugzilla at busybox.net bugzilla at busybox.net
Tue Jun 1 19:20:05 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=1891

           Summary: MIPS: errno variable bugged in ntpl branch
           Product: uClibc
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
        AssignedTo: unassigned at uclibc.org
        ReportedBy: hb at travelping.com
                CC: uclibc-cvs at uclibc.org
   Estimated Hours: 0.0


I'm developing software for an embedded mips based platform using uClibc
ntpl-svn 00891d9cf07efd992023f255164bba93d657ece4 compiled with gcc-4.4.3
(although gcc versions doesn't seem to matter). Reading the debug output of the
pppd i found some nonsense error messages. Adding some extra lines to the code,
i noticed errno was always holding the value of the requested filedescriptor
using normal read/write operations. In order to isolate the bug i wrote the
following testframe:

int main(int argh, char **argv){
    unsigned char buf[32];
    int ter, sz;

    while (1) {
    puts("trying to read from non existing descriptor.");
    sz = read(666, buf, 16);
    ter = errno;
    puts("done.");
    if (sz < 0) {
        puts("read failed.");
        printf("errno holds a value of %d.\n", ter);
    } else
        puts("erg... read succeded?");
    puts("---");
    }
    return 0;
}

It showed up that errno really was set to 666 instead of EBADF (Bad file
descriptor).

I already added the patch labeled 'MIPS: restore INLINE_SYSCALL macro' hoping
this would fix the issue, but it didn't. I have been digging through the change
logs and I think this hasn't been fixed yet.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list