search for: rodatamem

Displaying 2 results from an estimated 2 matches for "rodatamem".

2017 Jul 14
5
SectionMemoryManager::finalizeMemory ... read only data become executable?
...MemoryManager.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); ^^^^^^^^^^^^^^^^^^^^^ Why is this also MF_EXEC? Best regards, Michal Srb
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 why is RODataMem made READ and EXEC? It sounds like it should be only READ. Michal