[compiler-rt] [scudo] Add `__scudo_get_info` symbol to export stats to a buffer. (PR #130273)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 10:36:46 PDT 2025


================
@@ -128,6 +128,52 @@ TEST(ScudoStringsTest, Padding) {
   testAgainstLibc<int>("%03d - %03d", -12, -1234);
 }
 
+TEST(ScudoStringsTest, CopyIntoNullBuffer) {
+  scudo::ScopedString Str;
+  Str.append("abc");
+  EXPECT_EQ(4U, Str.copyToBuffer(nullptr, 0));
+}
----------------
ChiaHungDuan wrote:

If we agree the suggestion mentioned above, we may not need this

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


More information about the llvm-commits mailing list