diff --git a/ykrt/src/trace/swt/patch.rs b/ykrt/src/trace/swt/patch.rs index e6d5be2fd..ebcf84832 100644 --- a/ykrt/src/trace/swt/patch.rs +++ b/ykrt/src/trace/swt/patch.rs @@ -68,7 +68,7 @@ unsafe fn patch_function(function_ptr: usize, code: *const u8, size: size_t) { - (func_address as usize)) as usize; // Set function memory region to be writable - let result = mprotect(func_address, page_size_aligned, PROT_READ | PROT_WRITE | PROT_EXEC); + let result = mprotect(func_address, page_size_aligned, PROT_READ | PROT_WRITE); if result != 0 { panic!("Failed to change memory protection to be writable"); }