[PATCH] D111342: [scudo] Reduce the scope of AllocAfterFork
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 7 14:02:17 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6727832c324c: [scudo] Reduce the scope of AllocAfterFork (authored by cryptoad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111342/new/
https://reviews.llvm.org/D111342
Files:
compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
Index: compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
===================================================================
--- compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
+++ compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
@@ -130,10 +130,6 @@
}
#if !SCUDO_FUCHSIA
-// TODO(kostyak): for me, this test fails in a specific configuration when ran
-// by itself with some Scudo or GWP-ASan violation. Other people
-// can't seem to reproduce the failure. Consider skipping this in
-// the event it fails on the upstream bots.
TEST(ScudoWrappersCppTest, AllocAfterFork) {
std::atomic_bool Stop;
@@ -142,7 +138,7 @@
for (size_t N = 0; N < 5; N++) {
std::thread *T = new std::thread([&Stop] {
while (!Stop) {
- for (size_t SizeLog = 3; SizeLog <= 21; SizeLog++) {
+ for (size_t SizeLog = 3; SizeLog <= 20; SizeLog++) {
char *P = new char[1UL << SizeLog];
EXPECT_NE(P, nullptr);
// Make sure this value is not optimized away.
@@ -155,10 +151,10 @@
}
// Create a thread to fork and allocate.
- for (size_t N = 0; N < 100; N++) {
+ for (size_t N = 0; N < 50; N++) {
pid_t Pid;
if ((Pid = fork()) == 0) {
- for (size_t SizeLog = 3; SizeLog <= 21; SizeLog++) {
+ for (size_t SizeLog = 3; SizeLog <= 20; SizeLog++) {
char *P = new char[1UL << SizeLog];
EXPECT_NE(P, nullptr);
// Make sure this value is not optimized away.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111342.378003.patch
Type: text/x-patch
Size: 1528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211007/299338f9/attachment.bin>
More information about the llvm-commits
mailing list