Skip to content

Commit

Permalink
Merge pull request oneapi-src#1878 from yingcong-wu/yc/240719-fix-deb…
Browse files Browse the repository at this point in the history
…ug-async-write

[DeviceSanitizer] Extend a variable lifetime to fix a flaky failure
  • Loading branch information
pbalcer authored Jul 24, 2024
2 parents 9b20964 + 279f580 commit 907f154
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/loader/layers/sanitizer/asan_interceptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,9 @@ ur_result_t SanitizerInterceptor::prepareLaunch(

// Write debug
// We use "uint64_t" here because EnqueueWriteGlobal will fail when it's "uint32_t"
uint64_t Debug = Options(logger).Debug ? 1 : 0;
// Because EnqueueWriteGlobal is a async write, so
// we need to extend its lifetime
static uint64_t Debug = Options(logger).Debug ? 1 : 0;
EnqueueWriteGlobal(kSPIR_AsanDebug, &Debug, sizeof(Debug));

// Write shadow memory offset for global memory
Expand Down

0 comments on commit 907f154

Please sign in to comment.