Displaying 2 results from an estimated 2 matches for "mf_read".
2017 Jul 14
5
SectionMemoryManager::finalizeMemory ... read only data become executable?
...at looks like a bug. If
it is intentional for some reason, it is not obvious why.
In lib/ExecutionEngine/SectionMemoryManager.cpp in
SectionMemoryManager::finalizeMemory method:
// Make code memory executable.
ec = applyMemoryGroupPermissions(CodeMem,
sys::Memory::MF_READ | sys::Memory::MF_EXEC);
...
// Make read-only data memory read-only.
ec = applyMemoryGroupPermissions(RODataMem,
sys::Memory::MF_READ | sys::Memory::MF_EXEC);
^^^^^^^^^^^^^^^^^^^^^...
2017 Jul 15
2
SectionMemoryManager::finalizeMemory ... read only data become executable?
On Saturday, 15 July 2017 05:46:35 CEST 陳韋任 wrote:
> SectionMemoryManager allocates executable memory section for MCJIT
> (JIT emit code then execute).
> So the bottomline is making the section sys::Memory::MF_EXEC. As for
> RODataMem, we also need
> to make sure it's read-only. You can compare it to RWDataMem, which
> has write permission.
That makes sense. My question is