Skip to content

Commit 5a10a41

Browse files
committed
only unregister when build success
1 parent 6a31f34 commit 5a10a41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/loader/layers/sanitizer/asan/asan_ddi.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ ur_result_t UR_APICALL urProgramRelease(
434434
auto ProgramInfo = getAsanInterceptor()->getProgramInfo(hProgram);
435435
UR_ASSERT(ProgramInfo != nullptr, UR_RESULT_ERROR_INVALID_VALUE);
436436
if (--ProgramInfo->RefCount == 0) {
437-
UR_CALL(getAsanInterceptor()->unregisterProgram(hProgram));
437+
if (ProgramInfo->IsBuildSuccessful) {
438+
UR_CALL(getAsanInterceptor()->unregisterProgram(hProgram));
439+
}
438440
UR_CALL(getAsanInterceptor()->eraseProgram(hProgram));
439441
}
440442

0 commit comments

Comments
 (0)