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

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 18 07:04:39 PDT 2019


mstorsjo accepted this revision.
mstorsjo added inline comments.
This revision is now accepted and ready to land.


================
Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:800
         /*flags*/ 0);
+    header_sp->SetPermissions(ePermissionsReadable);
     m_sections_up->AddSection(header_sp);
----------------
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.


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

https://reviews.llvm.org/D69102





More information about the lldb-commits mailing list