- Subject: libc/1424: llseek symbol is attractive nuisance
- From: Michael Deutschmann <michael at talamasca dot wkpowerlink dot com>
- Date: Thu Nov 25 14:03:53 1999
Topics:
libc/1424: llseek symbol is attractive nuisance
----------------------------------------------------------------------
Date: Tue, 2 Nov 1999 20:40:46 -0800 (PST)
From: Michael Deutschmann <michael@talamasca.wkpowerlink.com>
To: bugs@gnu.org
Subject: libc/1424: llseek symbol is attractive nuisance
Message-Id: <%Oo7H4AJZP@khar-pern.talamasca>
>Number: 1424
>Category: libc
>Synopsis: llseek symbol is attractive nuisance
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: libc-gnats
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Wed Nov 03 01:50:01 EST 1999
>Last-Modified:
>Originator: Michael Deutschmann
>Organization:
>Release: libc-2.1.2
>Environment:
Host type: i486-pc-linux-gnu
System: Linux khar-pern 2.0.38 #1 Mon Aug 16 22:50:37 PDT 1999 i486 unknown
Addons: crypt linuxthreads
Build CFLAGS: -O3 -mcpu=i486 -march=i486 -fomit-frame-pointer -pipe
Build CC: gcc
Compiler version: 2.95.1 19990816 (release)
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: no
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
Recent versions of GNU libc do not prototype the llseek() function. I
understand why this is so, however, there is a seperate problem in that the
library still includes the function. Thus, a program designed to use
llseek may still compile, if strict prototype warnings aren't selected.
I understand that llseek will silently operate incorrectly in such
programs, since the missing prototype means that it is called
incorrectly. This apparently caused major problems for e2fsck a while
back.
(e2fsprogs now works, but by bypassing libc. Theodore T'so is
rather bitter about the whole thing.)
In the absence of the prototype, this "llseek" function is a nuisance and
should be removed, so that an llseek-using program will fail to link and
the problem will come to the user's attention before any data is damaged.
>How-To-Repeat:
int main(void)
{
llseek();
}
This code successfully compiles and links. That is the problem. It
should fail to link due to the undefined symbol.
>Fix:
Use your symbol versioning magic to make the "llseek" symbol invisible.
>Audit-Trail:
>Unformatted:
------------------------------
End of forward0gC_Tf Digest
***************************