Hi, I ran across this issue developing the Vulkan-Loader, which uses the pattern shown in the reproducible during test execution (where it loads and unloads dylibs over and over).
Thank you pesik for the workaround, that works like a charm. While diagnosing the issue I found another workaround which is to add RTLD_NODELETE to the flags of dlopen. This works but has the side effect of not completely resetting globals defined in the dylib.
Topic:
Developer Tools & Services
SubTopic:
General
Tags: