[Lldb-commits] [PATCH] D69102: COFF: Set section permissions

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 18 10:48:54 PDT 2019


mstorsjo added inline comments.


================
Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:800
         /*flags*/ 0);
+    header_sp->SetPermissions(ePermissionsReadable);
     m_sections_up->AddSection(header_sp);
----------------
mstorsjo wrote:
> labath wrote:
> > labath wrote:
> > > Are these the right permissions for the header?
> > I've dug around in some minidumps I have around and this does appear to be correct. It looks like the entire block of memory for the object is first allocated with PAGE_EXECUTE_WRITE_COPY, and the permissions for the header region are later changed to PAGE_READ_ONLY.
> I haven't checked, but I certainly would expect it to be readonly.
I wrote the last comment before seeing the preceding update, which is why it seems odd here.


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

https://reviews.llvm.org/D69102





More information about the lldb-commits mailing list