[compiler-rt] [asan] Use InternalMmapVector for error_message_buffer, reallocate wh… (PR #77488)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 00:04:20 PST 2024


================
@@ -42,17 +41,15 @@ void AppendToErrorMessageBuffer(const char *buffer) {
   Lock l(&error_message_buf_mutex);
   if (!error_message_buffer) {
     error_message_buffer =
-      (char*)MmapOrDieQuietly(kErrorMessageBufferSize, __func__);
-    error_message_buffer_pos = 0;
+        new (GetGlobalLowLevelAllocator()) InternalMmapVector<char>();
----------------
vitalybuka wrote:

instead of Allocator, can you use instead approach used for thread_registry_placeholder?



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


More information about the llvm-commits mailing list