When suppressing errors from uninstrumented MPI libraries, sanitizer runtime calls Die(), because some of the suppressed libraries are unloaded during execution.
This patch is to remove the hard failure and change the message to a verbose message.
I added a testcase. I added it just for Linux, because I have no machine ready to test dl-loading on other OS.
The test succeeds with the patch, but "Die"s when replacing the clang calls with release clang.
The test includes the library to be built as well as the application which loads and closes the library.
There are several reasons:
Nobody runs tsan with verbosity flag, so that message won't be helpful. We either need to resolve the problems, or at the very least do what we do with multithreaded fork -- fail loudly unless an explicit flag a-la enable_ignored_library_unloading_yes_I_know_what_I_am_doing_and_taking_full_responsibility is given.