Skip to content

Commit 3e9b9ad

Browse files
committed
fix asan tests
1 parent 7452e5d commit 3e9b9ad

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/SYCLLowerIR/ComputeModuleRuntimeInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bool isModuleUsingAsan(const Module &M) {
5050
}
5151

5252
bool isModuleUsingMsan(const Module &M) {
53-
return M.getGlobalVariable("__MsanKernelMetadata") != nullptr;
53+
return M.getNamedGlobal("__MsanKernelMetadata");
5454
}
5555

5656
// This function traverses over reversed call graph by BFS algorithm.

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,11 +1877,11 @@ void ProgramManager::addImages(sycl_device_binaries DeviceBinary) {
18771877
std::string SanValue =
18781878
detail::DeviceBinaryProperty(SanProp).asCString();
18791879

1880-
if (SanValue == "asan") {
1880+
if (SanValue.rfind("asan", 0) == 0) { // starts_with
18811881
m_SanitizerFoundInImage = SanitizerType::AddressSanitizer;
1882-
} else if (SanValue == "msan") {
1882+
} else if (SanValue.rfind("msan", 0) == 0) {
18831883
m_SanitizerFoundInImage = SanitizerType::MemorySanitizer;
1884-
} else if (SanValue == "tsan") {
1884+
} else if (SanValue.rfind("tsan", 0) == 0) {
18851885
m_SanitizerFoundInImage = SanitizerType::ThreadSanitizer;
18861886
}
18871887
}

0 commit comments

Comments
 (0)