Skip to content

Commit

Permalink
Changed: LocatorHeader doesn't need to have execute permission
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Sep 9, 2023
1 parent 9bbdc8c commit fbe9034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src-rust/src/internal/locator_header_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ unsafe fn init_locatorheader_standard() -> *mut LocatorHeader {
unsafe fn init_locatorheader_memorymappedfiles_unsupported() -> *mut LocatorHeader {
let mmap = MmapOptions::new(MmapOptions::allocation_granularity())
.unwrap()
.with_unsafe_flags(UnsafeMmapFlags::JIT)
.map_exec_mut()
.map_mut()
.unwrap();

LOCATOR_HEADER_ADDRESS = mmap.start() as *mut LocatorHeader;
Expand Down
2 changes: 1 addition & 1 deletion src-rust/src/internal/memory_mapped_file_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl UnixMemoryMappedFile {
mmap(
std::ptr::null_mut::<c_void>(),
length,
PROT_READ | PROT_WRITE | PROT_EXEC,
PROT_READ | PROT_WRITE,
MAP_SHARED,
file_descriptor,
0,
Expand Down

0 comments on commit fbe9034

Please sign in to comment.