Detect jemalloc and do not proceed if used
In Knot Resolver, we use jemalloc
when possible, because it
behaves slightly better with our particular memory allocation patterns. This is
at odds with Deckard testing, because it uses libfaketime
, which
exhibits issues when used in conjunction with jemalloc
.
From time to time, this causes confusion on our side when we try to test a
jemalloc
-linked Knot Resolver with Deckard.
It would be a nice-to-have feature of Deckard, if it could detect that any of
the tested servers is dynamically linked against libjemalloc
, printed a
warning stating so, and skipped the test (exited with code 77
-
meson context). There should also be an option added to
force-run the test, in case a new version of libfaketime
comes out that does
not exhibit the issue anymore.
Further info:
-
ldd
is a command which can print an executable's dependencies, readily available on most *nix-like OSes, but be careful about running it on untrusted stuff. -
libtree
is a nice alternative toldd
, which should not exhibit its security issues. -
LIEF seems to be a maintained Python library which can parse ELF
files, i.e. get (at least some of) the information
ldd
and/orlibtree
get in the form of a Python object.