This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: One serious bug in glibc 2.0/2.1
- To: hjl@lucon.org (H.J. Lu)
- Subject: Re: One serious bug in glibc 2.0/2.1
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: 07 Aug 1998 13:10:31 +0200
- Cc: drepper@cygnus.com (Ulrich Drepper), rth@cygnus.com, libc-hacker@cygnus.com (GNU C Library)
- References: <m0z4R45-00038xC@ocean.lucon.org>
hjl@lucon.org (H.J. Lu) writes:
|> Hi,
|>
|> There is one serious bug in glibc 2.0/2.1 in dealing with system
|> calls. glibc assumes system calls returns int. That may be true on
|> x86. But it is not always true on alpha where int is 4 byte and
|> long is 8 byte. Some system calls return long instead of int. Those
|> system calls are those which return offset or address. At least, lseek
|> is not handled right on alpha. Return -1 as long turns into -1 as int
|> which is 0xffffffff in long. We should go over all those system calls
|> and fix them.
Isn't it the resposibility of the PSEUDO macro in sysdep.h to get things
right? On m68k where pointers are returned in %a0 instead of %d0 this
works ok. I don't see where the return type of int is hardcoded, except
in syscall(), but that is unreliable anyway.
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
schwab@gnu.org