[all-commits] [llvm/llvm-project] 119c46: [LLDB][Windows] Initialize `read_result` (#184874)

Nerixyz via All-commits all-commits at lists.llvm.org
Fri Mar 6 03:33:54 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 119c466e1228f4e5f80953fc6490529f227892f4
      https://github.com/llvm/llvm-project/commit/119c466e1228f4e5f80953fc6490529f227892f4
  Author: Nerixyz <nerixdev at outlook.de>
  Date:   2026-03-06 (Fri, 06 Mar 2026)

  Changed paths:
    M lldb/source/Host/windows/ConnectionGenericFileWindows.cpp

  Log Message:
  -----------
  [LLDB][Windows] Initialize `read_result` (#184874)

When I ran `lldb -o "b main" -o r`, the process crashed at `if
(!read_result || m_read_pending)`, because `read_result` was
uninitialized.

As a sidenote: MSVC inserts calls to `_RTC_UninitUse` which causes a
pretty error message when debugging with VS:
> Exception has occurred: The variable 'read_result' is being used
without being initialized.
> Run-Time Check Failure [#]3 - The variable 'read_result' is being used
without being initialized.

With LLDB, you get
```
(lldb) r
Process 12344 stopped
* thread #9, stop reason = Exception 0x80000003 encountered at address 0x7ff96516c96a
       frame #0: 0x00007ff96516c96b liblldb.dll`failwithmessage(retaddr=0x00007ff95742cb02, crttype=1, errnum=3, msg="The variable 'read_result' is being used without being initialized.") at error.cpp:210
```

We could improve on the stop reason that's displayed.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list