[compiler-rt] [scudo] Clean up string handling (PR #86364)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 12:51:32 PDT 2024


================
@@ -123,3 +127,31 @@ TEST(ScudoStringsTest, Padding) {
   testAgainstLibc<int>("%03d - %03d", 12, 1234);
   testAgainstLibc<int>("%03d - %03d", -12, -1234);
 }
+
+#if defined(__linux__)
+#include <sys/resource.h>
+
+TEST(ScudoStringsTest, CapacityIncreaseFails) {
+  scudo::ScopedString Str;
+
+  rlimit Limit = {};
+  EXPECT_EQ(0, getrlimit(RLIMIT_AS, &Limit));
+  rlimit EmptyLimit = {.rlim_max = Limit.rlim_max};
----------------
cferris1000 wrote:

Thanks for fixing this.

https://github.com/llvm/llvm-project/pull/86364


More information about the llvm-commits mailing list