This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: mmap stdio breaks GNU ld
- From: Geoff Keating <geoffk at geoffk dot org>
- To: roland at frob dot com
- Cc: drepper at redhat dot com, haible at ilog dot fr, libc-alpha at sources dot redhat dot com
- Date: Fri, 18 Jan 2002 16:25:37 -0800
- Subject: Re: mmap stdio breaks GNU ld
- References: <20020118230738.5390E1BA0B@perdition.linnaean.org>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> From: Roland McGrath <roland@frob.com>
> Date: Fri, 18 Jan 2002 18:07:38 -0500 (EST)
> However, many programs over the years have assumed it and it has always
> been true. Such assumptions are likely to produce subtle problems. I
> think we should preserve the property of fopen not moving the file position
> for the sake of compatibility.
I think we should either document such things as reliable properties
of the library, or actively try to break them. Otherwise you end up
with programs relying on things "because it's always worked". Indeed,
I think we should try harder to vary things like the details of the
stdio implementation, internal glibc symbols, and the details of the
malloc implementation, because these are areas where we've repeatedly
had problems with programs assuming things that are not part of the
specification, and the longer that such things are unchanged the
louder the complaints will be in the end.
In the case of the file position after fopen, it seems like
documenting this would limit glibc's freedom to cache file contents;
and there are already documented ways to synchronise stdio streams
with the underlying file. It's hard to argue that this should be a
permanent, documented, property of the libc.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>