[compiler-rt] r354947 - [NFC][Sanitizer] Add TODO comments
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 26 17:38:54 PST 2019
Author: yln
Date: Tue Feb 26 17:38:54 2019
New Revision: 354947
URL: http://llvm.org/viewvc/llvm-project?rev=354947&view=rev
Log:
[NFC][Sanitizer] Add TODO comments
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc?rev=354947&r1=354946&r2=354947&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc Tue Feb 26 17:38:54 2019
@@ -70,8 +70,7 @@ static inline uhwptr *GetCanonicFrame(up
void BufferedStackTrace::UnwindFast(uptr pc, uptr bp, uptr stack_top,
uptr stack_bottom, u32 max_depth) {
- // CHECK_NE(stack_bottom, 0);
- // CHECK_GT(stack_top, stack_bottom);
+ // TODO(yln): add arg sanity check for stack_top/stack_bottom
CHECK_GE(max_depth, 2);
const uptr kPageSize = GetPageSizeCached();
trace_buffer[0] = pc;
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc?rev=354947&r1=354946&r2=354947&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc Tue Feb 26 17:38:54 2019
@@ -23,8 +23,7 @@ namespace __sanitizer {
void BufferedStackTrace::UnwindFast(uptr pc, uptr bp, uptr stack_top,
uptr stack_bottom, u32 max_depth) {
- // CHECK_NE(stack_bottom, 0);
- // CHECK_GT(stack_top, stack_bottom);
+ // TODO(yln): add arg sanity check for stack_top/stack_bottom
CHECK_GE(max_depth, 2);
const uptr kPageSize = GetPageSizeCached();
trace_buffer[0] = pc;
More information about the llvm-commits
mailing list