Skip to content

[LLDB][Telemetry]Init field to nullptr. #131191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged

[LLDB][Telemetry]Init field to nullptr. #131191

merged 1 commit into from
Mar 13, 2025

Conversation

oontvoo
Copy link
Member

@oontvoo oontvoo commented Mar 13, 2025

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

The field is currently un-initialised and can cause a crash in some build configs (where it got random values)
@oontvoo oontvoo requested a review from JDevlieghere as a code owner March 13, 2025 19:06
@llvmbot llvmbot added the lldb label Mar 13, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 13, 2025

@llvm/pr-subscribers-lldb

Author: Vy Nguyen (oontvoo)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/131191.diff

1 Files Affected:

  • (modified) lldb/include/lldb/Core/Telemetry.h (+1-1)
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 {

@oontvoo oontvoo merged commit b36bf47 into llvm:main Mar 13, 2025
10 of 11 checks passed
frederik-h pushed a commit to frederik-h/llvm-project that referenced this pull request Mar 18, 2025
The field is currently un-initialised and can cause a crash in some
build configs (where it got random values)
@oontvoo oontvoo deleted the cleanup branch June 2, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants