Skip to content
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

[scudo] Convert assert to CHECK macro. #67184

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

cferris1000
Copy link
Contributor

This code is only for riscv, but use the CHECK macro to avoid unused parameters problems if assert is not defined.

This code is only for riscv, but use the CHECK macro to avoid unused
parameters problems if assert is not defined.
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 22, 2023

@llvm/pr-subscribers-compiler-rt-sanitizer

Changes

This code is only for riscv, but use the CHECK macro to avoid unused parameters problems if assert is not defined.


Full diff: https://github.com/llvm/llvm-project/pull/67184.diff

1 Files Affected:

  • (modified) compiler-rt/lib/scudo/standalone/tests/combined_test.cpp (+2-2)
diff --git a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
index f00d475148e8dcd..1143aaab8371d37 100644
--- a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
@@ -106,8 +106,8 @@ struct TestAllocatorStorage {
 
   // To alleviate some problem, let's skip the thread safety analysis here.
   static void *get(size_t size) NO_THREAD_SAFETY_ANALYSIS {
-    assert(size <= kMaxSize &&
-           "Allocation size doesn't fit in the allocator storage");
+    CHECK(size <= kMaxSize &&
+          "Allocation size doesn't fit in the allocator storage");
     M.lock();
     return AllocatorStorage;
   }

@cferris1000 cferris1000 merged commit f71ba7d into llvm:main Sep 22, 2023
6 checks passed
@cferris1000 cferris1000 deleted the unused_params branch September 22, 2023 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants