[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#35049: More information

On Fri, Mar 26, 1999 at 12:47:56PM +0100, Richard Braakman wrote:
> (I'm Cc:ing the bash maintainer on this one.  Guy, please see the logs
> for bug#35049 for the context.)
> I found the difference.  bash 2.01.1 was compiled without
> optimization, and bash 2.02.1 was compiled with -O2.  (This means we
> shipped slink with an unoptimized bash, hmph.)
> Without optimization, the stat functions defined in <sys/stat.h> are
> not inlined.  They are referenced as external symbols, and the glibc
> people expect that they will be found in libc_nonshared.a.


> What I still don't know is _why_ these definitions are unshared.
> It seems to me that it can only cause problems.  What does it solve?

[ Take this explanation with a grain of salt, I'm not sure I'm
remembering this correctly ]

They are unshared, if I remember correctly, to deal with interface
problems in changing stat() functionality.  Notice the definitions call
xstat, which is shared:

extern __inline__ int stat (__const char *__path,
                            struct stat *__statbuf) __THROW
  return __xstat (_STAT_VER, __path, __statbuf);

This is because the contents of struct stat show a higher-than-averagae
inclination to change.  _STAT_VER allows glibc to return the expected
struct stat; another piece of the binary compatibility effort.  Why
stat() needed a different solution than library versioning is unclear.

> I see two ways to deal with the current situation.
> Strategy 1
> The symbol table pollution in libreadline is glibc's fault.  glibc
> should deal with it by defining the necessary symbols dynamically.
> This will fix bash, and prevent reoccurrence of this problem in
> other libraries.  But if it is done only by Debian, it may cause binary
> incompatibility with other platforms.

And I believe that Ulrich has in the past declined to make this change.


/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|     CMU, CS class of 2002      |
|   Debian GNU/Linux Developer    __   Part-Time Systems Programmer  |
|         dan@debian.org         |  |        drow@cs.cmu.edu         |
\--------------------------------/  \--------------------------------/

Reply to: