summaryrefslogtreecommitdiff
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2022-10-21 17:06:34 -0400
committerGitHub <noreply@github.com>2022-10-21 17:06:34 -0400
commit87bb0bee6b9843ea32ca6bb48f9e03b1876b7c48 (patch)
tree91d9e8f18c1f7b12c2a606f7cc4b0207ee404269 /vm_insnhelper.h
parent8bbcb75377fed4e4e7f2a5848e1a21f4dc0efa8c (diff)
downloadruby-87bb0bee6b9843ea32ca6bb48f9e03b1876b7c48.tar.gz
YJIT: Fix page rounding for icache busting
Previously, we found the current page by rounding the current pointer to the closest smaller page size. This is incorrect because pages are relative to the start of the address we reserve. For example, if the starting address is 12KiB modulo the 16KiB page size, once we have more than 4KiB of code, calculating with the address would incorrectly give us page 1 when we're actually still on page 0. Previously, I can reproduce crashes with: make btest RUN_OPTS=--yjit-code-page-size=32 on ARM64 macOS, where system page sizes are 16KiB.
Diffstat (limited to 'vm_insnhelper.h')
0 files changed, 0 insertions, 0 deletions