Created attachment 17632 [details]
When exiting various wrappers, the process crashes on the dlclose call. Indeed, when libc.so etc. are not found through an explicit name, RTLD_NEXT is used, but then at exit a dlclose attempt will be made, thus on RTLD_NEXT, which brings mayhem in the process.
The attached patches fix it.
Created attachment 17633 [details]
proposed fix (for socket_wrapper)
Created attachment 17634 [details]
proposed fix (for nss_wrapper)
Created attachment 17635 [details]
proposed fix (for priv_wrapper)
Created attachment 17636 [details]
proposed fix (for uid_wrapper)
Could you please open MRs at
for each of those wrappers?
Done so on