[Lldb-commits] [PATCH] D126657: [lldb] Fix loading DLL from some ramdisk on Windows

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 31 05:26:45 PDT 2022


mstorsjo added inline comments.


================
Comment at: lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp:427
+
+  auto view_deleter = [](void *pMem) { ::UnmapViewOfFile(pMem); };
+  std::unique_ptr<void, decltype(view_deleter)> pMem(
----------------
alvinhochun wrote:
> mstorsjo wrote:
> > Do you need a check against `NULL` here in `view_deleter`?
> I think `unique_ptr` guarantees the deleter won't be called if the pointer is null, so I didn't put a null check here.
Sounds plausible - I tried browsing the documentation for that but didn't find it spelled out explicitly (in the couple minutes I was browsing at least).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126657/new/

https://reviews.llvm.org/D126657



More information about the lldb-commits mailing list