From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 31152 invoked from network); 18 Mar 1999 01:23:55 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 18 Mar 1999 01:23:55 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id UAA01013 for ; Wed, 17 Mar 1999 20:13:40 -0500 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id SAA08616; Wed, 17 Mar 1999 18:13:35 -0700 From: Michal Jaegermann Message-Id: <199903180113.SAA08616@ellpspace.math.ualberta.ca> Subject: incorrect lseek() function in glibc-2.0.7 To: drepper@cygnus.com Date: Wed, 17 Mar 1999 18:13:35 -0700 (MST) Cc: axp-list@redhat.com, bj0rn@blox.se Content-Type: text lseek from glibc-2.0.7 is broken on Alpha. It is documented to have the following prototype: off_t lseek(int fildes, off_t offset, int whence); Here is a fragment of a trace from a new version of 'lsmod': .... open("/dev/kmem", O_RDONLY) = 4 lseek(4, 18446739675790475552, SEEK_SET) = 127435040 .... where the program attempts to seek to a location with a module information in a memory. 18446739675790475552 happens to be in hex 0xfffffc0007988120 and the return value is 0x7988120 so it is returned as 'int' and not 'off_t' - which, at least on Alpha, are of different sizes. What is more lseek() does not seem to be searching to a required location as an attempt to read from there results in obviously bogus values (all zeros). Michal Jaegermann, michal@harddata.com