mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 22:17:23 +08:00
[sanitizer] Don't call dlerror() after swift_demangle lookup through dlsym
Because the call to `dlerror()` may actually want to print something, which turns into a deadlock as showcased in #49223. Instead rely on further call to dlsym to clear `dlerror` internal state if they need to check the return status. Differential Revision: https://reviews.llvm.org/D128992
This commit is contained in:
@@ -72,7 +72,6 @@ static swift_demangle_ft swift_demangle_f;
|
||||
// symbolication.
|
||||
static void InitializeSwiftDemangler() {
|
||||
swift_demangle_f = (swift_demangle_ft)dlsym(RTLD_DEFAULT, "swift_demangle");
|
||||
(void)dlerror(); // Cleanup error message in case of failure
|
||||
}
|
||||
|
||||
// Attempts to demangle a Swift name. The demangler will return nullptr if a
|
||||
|
||||
Reference in New Issue
Block a user