-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DeviceSanitizer] Support "-fsanitize-ignorelist=" to disable sanitizing on some of kernels #15294
base: sycl
Are you sure you want to change the base?
Conversation
Hi @intel/dpcpp-sanitizers-review @intel/dpcpp-tools-reviewers @intel/dpcpp-esimd-reviewers, please review, Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not qualified to review the actual devicesan stuff, some high level comments
@@ -50,6 +50,10 @@ static bool instrumentDeviceGlobal(Module &M) { | |||
if (!isDeviceGlobalVariable(G) || !hasDeviceImageScopeProperty(G)) | |||
continue; | |||
|
|||
// Skip instrumenting on "__AsanKernelMetadata" etc. | |||
if (G.getName().starts_with("__Asan")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there other variables besides __AsanKernelMetadata
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but we used to use "__Asan" as an internal prefix.
} | ||
Modified |= ModuleSanitizer.instrumentModule(); | ||
if (!Modified) | ||
return PreservedAnalyses::all(); | ||
|
||
GlobalStringMap.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: GlobalStringMap should be cleared before every "return".
// Instrument each image scope device globals if the module has been | ||
// instrumented by sanitizer pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder: change this comment
UR: oneapi-src/unified-runtime#2055
We reuse
-fsanitize-ignorelist=
to support kernel filtering.Usage: https://clang.llvm.org/docs/SanitizerSpecialCaseList.html