Skip to content

Initialize field to appease msan #141537

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 2 commits into from
May 27, 2025
Merged

Initialize field to appease msan #141537

merged 2 commits into from
May 27, 2025

Conversation

googlewalt
Copy link
Contributor

Tested with lldb and lldb-dap test suites.

Tested with lldb and lldb-dap test suites.
@llvmbot
Copy link
Member

llvmbot commented May 27, 2025

@llvm/pr-subscribers-lldb

Author: Walter Lee (googlewalt)

Changes

Tested with lldb and lldb-dap test suites.


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

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp (+1)
diff --git a/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
index c9061ef19f17a..8825c5c6413b8 100644
--- a/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
@@ -27,6 +27,7 @@ namespace lldb_dap {
 
 static protocol::DisassembledInstruction GetInvalidInstruction() {
   DisassembledInstruction invalid_inst;
+  invalid_inst.address = 0;
   invalid_inst.presentationHint =
       DisassembledInstruction::eDisassembledInstructionPresentationHintInvalid;
   return invalid_inst;

@googlewalt googlewalt requested review from walter-erquinigo and eronnen and removed request for JDevlieghere May 27, 2025 02:41
Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to do the initialization here or inside the struct definition in ProtocolTypes.h?

@googlewalt
Copy link
Contributor Author

I can do that. It's probably better, though currently nothing in the struct is initialized.

@googlewalt
Copy link
Contributor Author

Do we want to do the initialization here or inside the struct definition in ProtocolTypes.h?

Done.

@googlewalt googlewalt merged commit b75d8bd into llvm:main May 27, 2025
10 checks passed
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Tested with lldb and lldb-dap test suites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants