[compiler-rt] 0d07922 - [NFC][asan] Simplify parameters check
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 10:58:02 PST 2022
Author: Vitaly Buka
Date: 2022-11-29T10:56:17-08:00
New Revision: 0d07922d921a1afe97d1056069b65976959a640c
URL: https://github.com/llvm/llvm-project/commit/0d07922d921a1afe97d1056069b65976959a640c
DIFF: https://github.com/llvm/llvm-project/commit/0d07922d921a1afe97d1056069b65976959a640c.diff
LOG: [NFC][asan] Simplify parameters check
Added:
Modified:
compiler-rt/lib/asan/asan_poisoning.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_poisoning.cpp b/compiler-rt/lib/asan/asan_poisoning.cpp
index e9c19b7ba4ff..5164b7d860f4 100644
--- a/compiler-rt/lib/asan/asan_poisoning.cpp
+++ b/compiler-rt/lib/asan/asan_poisoning.cpp
@@ -493,11 +493,9 @@ void __sanitizer_annotate_double_ended_contiguous_container(
constexpr uptr granularity = ASAN_SHADOW_GRANULARITY;
- if (!(storage_beg <= new_beg && new_beg <= storage_end) ||
- !(storage_beg <= new_end && new_end <= storage_end) ||
- !(storage_beg <= old_beg && old_beg <= storage_end) ||
- !(storage_beg <= old_end && old_end <= storage_end) ||
- !(old_beg <= old_end && new_beg <= new_end)) {
+ if (!(old_beg <= old_end && new_beg <= new_end) ||
+ !(storage_beg <= new_beg && new_end <= storage_end) ||
+ !(storage_beg <= old_beg && old_end <= storage_end)) {
GET_STACK_TRACE_FATAL_HERE;
ReportBadParamsToAnnotateDoubleEndedContiguousContainer(
storage_beg, storage_end, old_beg, old_end, new_beg, new_end, &stack);
More information about the llvm-commits
mailing list