[PATCH] D137354: [scudo] Extend basic test to cover zero size allocs.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 11:28:23 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG48dbf353025d: [scudo] Extend basic test to cover zero size allocs. (authored by eugenis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137354/new/

https://reviews.llvm.org/D137354

Files:
  compiler-rt/lib/scudo/standalone/tests/combined_test.cpp


Index: compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
===================================================================
--- compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+++ compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
@@ -153,7 +153,7 @@
   for (scudo::uptr AlignLog = MinAlignLog; AlignLog <= 16U; AlignLog++) {
     const scudo::uptr Align = 1U << AlignLog;
     for (scudo::sptr Delta = -32; Delta <= 32; Delta++) {
-      if (static_cast<scudo::sptr>(1U << SizeLog) + Delta <= 0)
+      if (static_cast<scudo::sptr>(1U << SizeLog) + Delta < 0)
         continue;
       const scudo::uptr Size = (1U << SizeLog) + Delta;
       void *P = Allocator->allocate(Size, Origin, Align);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137354.476193.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221117/d7bd1c6b/attachment.bin>


More information about the llvm-commits mailing list