Skip to content

Commit

Permalink
Remove PROT_EXEC from mprotect.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel-Durov committed Apr 9, 2024
1 parent c46bb5f commit 40c0696
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ykrt/src/trace/swt/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ unsafe fn patch_function(function_ptr: usize, code: *const u8, size: size_t) {
let result = mprotect(
func_address,
page_size_aligned,
PROT_READ | PROT_WRITE | PROT_EXEC,
PROT_READ | PROT_WRITE,
);
if result != 0 {
panic!("Failed to change memory protection to be writable");
Expand Down

0 comments on commit 40c0696

Please sign in to comment.