[PATCH] D69529: [scudo][standalone] Lists fix
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 15:30:08 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2513250be336: [scudo][standalone] Lists fix (authored by cryptoad, committed by hctim).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69529/new/
https://reviews.llvm.org/D69529
Files:
compiler-rt/lib/scudo/standalone/list.h
compiler-rt/lib/scudo/standalone/tests/list_test.cpp
Index: compiler-rt/lib/scudo/standalone/tests/list_test.cpp
===================================================================
--- compiler-rt/lib/scudo/standalone/tests/list_test.cpp
+++ compiler-rt/lib/scudo/standalone/tests/list_test.cpp
@@ -194,4 +194,18 @@
L.checkConsistency();
L.pop_front();
EXPECT_TRUE(L.empty());
+
+ L.push_back(X);
+ L.insert(Y, X);
+ EXPECT_EQ(L.size(), 2U);
+ EXPECT_EQ(L.front(), Y);
+ EXPECT_EQ(L.back(), X);
+ L.checkConsistency();
+ L.remove(Y);
+ EXPECT_EQ(L.size(), 1U);
+ EXPECT_EQ(L.front(), X);
+ EXPECT_EQ(L.back(), X);
+ L.checkConsistency();
+ L.pop_front();
+ EXPECT_TRUE(L.empty());
}
Index: compiler-rt/lib/scudo/standalone/list.h
===================================================================
--- compiler-rt/lib/scudo/standalone/list.h
+++ compiler-rt/lib/scudo/standalone/list.h
@@ -148,6 +148,7 @@
Last = X;
} else {
DCHECK_EQ(First->Prev, nullptr);
+ First->Prev = X;
}
X->Next = First;
First = X;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69529.226766.patch
Type: text/x-patch
Size: 1016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191028/86b22328/attachment.bin>
More information about the llvm-commits
mailing list