mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 11:10:21 +02:00
Ensure the end argument of __clear_cache is page aligned.
* lib/jit_arm.c, lib/jit_ppc.c: Do not rely on __clear_cache aligning to the next page boundary the end argument. It may actually truncate it.
This commit is contained in:
parent
51c96f9e19
commit
066db584c9
3 changed files with 10 additions and 2 deletions
|
@ -1563,7 +1563,8 @@ _emit_code(jit_state_t *_jit)
|
|||
patch_at(_jitc->patches.ptr[offset].kind & ~arm_patch_node, word, value);
|
||||
}
|
||||
|
||||
__clear_cache(_jit->code.ptr, _jit->pc.uc);
|
||||
word = sysconf(_SC_PAGE_SIZE);
|
||||
__clear_cache(_jit->code.ptr, (void *)((_jit->pc.w + word) & -word));
|
||||
|
||||
return (_jit->code.ptr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue