[compiler-rt] [compiler-rt][ASan] Remove alignment checks in ASan error reporting (PR #94103)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 1 00:45:48 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Tacet (AdvenamTacet)
<details>
<summary>Changes</summary>
Removed unnecessary alignment checks in ASan error reporting functions, as alignment is no longer required starting from LLVM 16.
Related commits:
- https://github.com/llvm/llvm-project/commit/dd1b7b797a116eed588fd752fbe61d34deeb24e4
- https://github.com/llvm/llvm-project/commit/1c5ad6d2c01294a0decde43a88e9c27d7437d157
---
Full diff: https://github.com/llvm/llvm-project/pull/94103.diff
1 Files Affected:
- (modified) compiler-rt/lib/asan/asan_errors.cpp (-4)
``````````diff
diff --git a/compiler-rt/lib/asan/asan_errors.cpp b/compiler-rt/lib/asan/asan_errors.cpp
index 3f2d13e314640..26eabf2400b77 100644
--- a/compiler-rt/lib/asan/asan_errors.cpp
+++ b/compiler-rt/lib/asan/asan_errors.cpp
@@ -328,8 +328,6 @@ void ErrorBadParamsToAnnotateContiguousContainer::Print() {
" new_mid : %p\n",
(void *)beg, (void *)end, (void *)old_mid, (void *)new_mid);
uptr granularity = ASAN_SHADOW_GRANULARITY;
- if (!IsAligned(beg, granularity))
- Report("ERROR: beg is not aligned by %zu\n", granularity);
stack->Print();
ReportErrorSummary(scariness.GetDescription(), stack);
}
@@ -348,8 +346,6 @@ void ErrorBadParamsToAnnotateDoubleEndedContiguousContainer::Print() {
(void *)old_container_end, (void *)new_container_beg,
(void *)new_container_end);
uptr granularity = ASAN_SHADOW_GRANULARITY;
- if (!IsAligned(storage_beg, granularity))
- Report("ERROR: storage_beg is not aligned by %zu\n", granularity);
stack->Print();
ReportErrorSummary(scariness.GetDescription(), stack);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/94103
More information about the llvm-commits
mailing list