-
Notifications
You must be signed in to change notification settings - Fork 787
[DevSan][Refactor] Make Options an unified class shared by all sanitizers #17157
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
[DevSan][Refactor] Make Options an unified class shared by all sanitizers #17157
Conversation
…5-unified-options-class
|
||
Parser.ParseUint64("quarantine_size_mb", MaxQuarantineSizeMB, 0, UINT32_MAX); | ||
Parser.ParseUint64("redzone", MinRZSize, 16, 2048); | ||
Parser.ParseUint64("max_redzone", MaxRZSize, 16, 2048); |
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.
As we discussed before, 'max_redzone' is probably not useful to the user, maybe we can remove it.
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.
Sure, I will remove it.
unified-runtime/source/loader/layers/sanitizer/sanitizer_common/sanitizer_options_impl.hpp
Show resolved
Hide resolved
@@ -13,14 +13,14 @@ | |||
|
|||
// Invalid quarantine_size_mb | |||
// RUN: env UR_LAYER_ASAN_OPTIONS=quarantine_size_mb:-1 %{run} not --crash %t 2>&1 | FileCheck %s --check-prefixes INVALID-QUARANTINE | |||
// RUN: env UR_LAYER_ASAN_OPTIONS=quarantine_size_mb:4294967296 %{run} not --crash %t 2>&1 | FileCheck %s --check-prefixes INVALID-QUARANTINE | |||
// INVALID-QUARANTINE: <SANITIZER>[ERROR]: "quarantine_size_mb" should be an integer in range[0, 4294967295]. | |||
// RUN: env UR_LAYER_ASAN_OPTIONS=quarantine_size_mb:4294967296 %{run} %t 2>&1 | FileCheck %s --check-prefixes INVALID-QUARANTINE |
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.
Why do you remove "not" here?
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.
Becase the out-of-range problem is now no longer an error. we will limit the value to a valid range(set to minimum or maximum value) and report a warning now, so we don't need a not
here anymore.
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
To address the comment #15293 (comment), I will remove the sycl e2e test sycl/test-e2e/AddressSanitizer/common/options-invalid-values.cpp and move those testing to the UR unit test. Tagging @AlexeySachkov . |
Kindly ping @intel/unified-runtime-reviewers @pbalcer @AlexeySachkov for review. |
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.
This is much nicer than how these options were parsed before. Thanks for doing the refactor!
UR lgtm.
Thanks for moving the test! I will leave the actual review to code owners |
Hi @intel/llvm-gatekeepers , the CUDA failure is unrelated and I have opened #17231 to track it. Could you please help merge this PR? Thanks. |
Options
shared by different sanitizers.max_redzone
option as we don't think it serves much purpose.Reason: