[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
Mon Jun 16 07:50:27 PDT 2025


================
@@ -229,6 +229,15 @@ void ScopedString::append(const char *Format, ...) {
   va_end(Args);
 }
 
+size_t ScopedString::copyToBuffer(char *OutputBase, size_t OutputLength) {
+  if (OutputBase && OutputLength) {
----------------
piwicode wrote:

Ok, I added a DCHECK to prevent call with null.
I left the original `getstat` code path unchanged, that is to say it accepts null buffer, and I will update that codepath in a separate change.

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


More information about the llvm-commits mailing list