[Lldb-commits] [lldb] [lldb][windows] fix a use before allocation crash (PR #170530)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 3 10:48:01 PST 2025
================
@@ -133,6 +125,14 @@ ProcessLauncherWindows::LaunchProcess(const ProcessLaunchInfo &launch_info,
auto delete_attributelist = llvm::make_scope_exit(
[&] { DeleteProcThreadAttributeList(startupinfoex.lpAttributeList); });
+ auto inherited_handles_or_err = GetInheritedHandles(
----------------
JDevlieghere wrote:
I know you're just moving existing code, but this does not conform to LLVM's guidelines regarding `auto` use. The type isn't obvious from the RHS. I guess the old code was closer to where `inherited_handles` is declared, but that begs the questions why this is written in C89-style with all the variables declared at the start of the function. Can you move this to line 134?
https://github.com/llvm/llvm-project/pull/170530
More information about the lldb-commits
mailing list