[Lldb-commits] [lldb] [LLDB][Telemetry]Init field to nullptr. (PR #131191)

Vy Nguyen via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 13 12:06:37 PDT 2025


https://github.com/oontvoo created https://github.com/llvm/llvm-project/pull/131191

The field is currently un-initialised and can cause a crash in some build configs (where it got random values)

>From 543e208f31370310ed938425fbf89ffb3a7232fd Mon Sep 17 00:00:00 2001
From: Vy Nguyen <vyng at google.com>
Date: Thu, 13 Mar 2025 15:04:52 -0400
Subject: [PATCH] [LLDB][Telemetry]Init field to nullptr.

The field is currently un-initialised and can cause a crash in some build configs (where it got random values)
---
 lldb/include/lldb/Core/Telemetry.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/include/lldb/Core/Telemetry.h b/lldb/include/lldb/Core/Telemetry.h
index 56259e4a673bf..29ec36b2d64d1 100644
--- a/lldb/include/lldb/Core/Telemetry.h
+++ b/lldb/include/lldb/Core/Telemetry.h
@@ -65,7 +65,7 @@ struct LLDBBaseTelemetryInfo : public llvm::telemetry::TelemetryInfo {
   // TBD: could add some memory stats here too?
 
   lldb::user_id_t debugger_id = LLDB_INVALID_UID;
-  Debugger *debugger;
+  Debugger *debugger = nullptr;
 
   // For dyn_cast, isa, etc operations.
   llvm::telemetry::KindType getKind() const override {



More information about the lldb-commits mailing list