NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/40220: LD_PRELOAD with dlsym(RTLD_NEXT, "stat") recursion
The following reply was made to PR lib/40220; it has been noted by GNATS.
From: Christian Biere <christianbiere%gmx.de@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: Re: lib/40220: LD_PRELOAD with dlsym(RTLD_NEXT, "stat") recursion
Date: Sat, 18 Apr 2009 15:58:23 +0200
I just noticed similar i.e., socker[1] doesn't work anymore when using
the LD_PRELOAD wrapper on NetBSD. I've looked at the workaround in the
pkgsrc patch.
The workaround is to use "__stat30" instead of "stat" for dlsym().
For socker I had to change "socket" to "__socket30".
A quick check shows that a couple functions seem to be affected by
this:
$ nm /lib/libc.so|sed -n 's,^.* T __\(.*\)30$,\1,p'
_readdir_unlocked
fhstat
fstat
fts_children
fts_close
fts_open
fts_read
fts_set
getdents
getfh
glob
globfree
lstat
ntp_gettime
opendir2
opendir
readdir
readdir_r
scandir
socket
stat
Will this be fixed or are the "__.*30" names permanent?
If these change the workaround will of course turn into a bug itself.
[1]
https://gtk-gnutella.svn.sourceforge.net/svnroot/gtk-gnutella/trunk/gtk-gnutella/contrib/socker/README
--
Christian
Home |
Main Index |
Thread Index |
Old Index