libdnssec uses `pthread_create`,but does not link explicitly against `libpthread`
libdnssec.so.6.0.0
links against libgnutls
, which conveniently happens to link to libpthread
. If some new version of libgnutls
is built which does not link against libpthread
, then libdnssec.so.6.0.0
will fail to load because it uses pthread_create
, but does not actually link against it.
0 dkg@alice:~$ readelf -d /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0 | grep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libgnutls.so.30]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0 dkg@alice:~$ readelf --dyn-syms /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0 | grep pthread
22: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_once
0 dkg@alice:~$
it would be good to link libdnssec.so.6
explicitly against libpthread as long as ENABLE_PKCS11
is set, since src/libdnssec/keystore/pkcs11.c
invokes pthread_once
in pkcs11_ctx_new()
.
This is https://bugs.debian.org/915119