-
Notifications
You must be signed in to change notification settings - Fork 789
[SYCL][DeviceSanitizer] Use -asan-constructor-kind=none to disable ctor/dtor #13259
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
Conversation
…or/dtor The removed code fails to prevent ctor/dtor generation.
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.
LGTM
@@ -1151,6 +1151,9 @@ void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, | |||
CmdArgs.push_back("-mllvm"); | |||
CmdArgs.push_back("-asan-instrumentation-with-call-threshold=0"); | |||
|
|||
CmdArgs.push_back("-mllvm"); | |||
CmdArgs.push_back("-asan-constructor-kind=none"); | |||
|
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.
Please also update clang/test/Driver/sycl-device-sanitizer.cpp
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.
done
// RUN: %clangxx -fsycl-device-only -fno-sycl-early-optimizations -Xarch_device -fsanitize=address -emit-llvm %s -S -o %t.ll | ||
// RUN: FileCheck %s --input-file %t.ll | ||
|
||
// CHECK-NOT: asan.module_ctor |
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.
Please add a comment explaining why we want that.
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.
done
@intel/llvm-gatekeepers please merge, thanks. |
We still need @intel/dpcpp-clang-driver-reviewers |
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.
LGTM
@intel/llvm-gatekeepers please merge, thanks |
The removed code fails to prevent ctor/dtor generation.