musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/malloc/malloc.c
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 /src/malloc/malloc.c
parent94f744195e17cf787a36c259254d56386b31fe20 (diff)
downloadmusl-66b53cfa8876342f7e7d7907d30c719c38cd5a1b.tar.gz
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 'src/malloc/malloc.c')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月22日 22:00:21 +0000

AltStyle によって変換されたページ (->オリジナル) /