about summary refs log tree commit diff
path: root/.gitignore
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-07-04 10:58:13 -0400
committerRich Felker <dalias@aerifal.cx>2017-07-04 11:05:05 -0400
commit66b53cfa8876342f7e7d7907d30c719c38cd5a1b (patch)
tree211439c479f256f76441a8937df956d7fd00d58a /.gitignore
parent94f744195e17cf787a36c259254d56386b31fe20 (diff)
downloadmusl-66b53cfa8876342f7e7d7907d30c719c38cd5a1b.tar.gz
musl-66b53cfa8876342f7e7d7907d30c719c38cd5a1b.tar.xz
musl-66b53cfa8876342f7e7d7907d30c719c38cd5a1b.zip
ldso: avoid spurious & possible erroneous work for libs with no deps
a null pointer for a library's deps list was ambiguous: it could
indicate either no dependencies or that the dependency list had not
yet been populated. inability to distinguish could lead to spurious
work when dlopen is called multiple times on a library with no deps,
and due to related bugs, could actually cause other libraries to
falsely appear as dependencies, translating into false positives for
dlsym.

avoid the problem by always initializing the deps pointer, pointing to
an empty list if there are no deps. rather than wasting memory and
introducing another failure path by allocating an empty list per
library, simply share a global dummy list.

further fixes will be needed for related bugs, and much of this code
may end up being replaced.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions