summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2024-11-11 13:27:28 -0500
committerAlan Wu <[email protected]>2024-11-11 16:35:57 -0500
commit821a5b966fbc2926dc3bf88b6ba09879fa35318e ()
tree0c29a821afdec04a5bf2ab19f016e57247e62245
parent1d1c80e6443e21a7e10d9d4987b0deb1ef8ec374 (diff)
YJIT: Probe away from the heap when requesting exec memory
I was looking at some crash reports and noticed that many have a line like the following for YJIT code memory: <addr>-<addr> r-xp 00000000 00:00 0 [heap] I guess YJIT confused the kernel into thinking this region is from sbrk(). While this seems to have no consequences beyond mislabeling, it's still a little concerning. Probe downwards instead.
Notes: Merged: https://.com/ruby/ruby/pull/12058
-rw-r--r--yjit.c7
1 files changed, 5 insertions, 2 deletions
@@ -294,8 +294,11 @@ rb_yjit_reserve_addr_space(uint32_t mem_size)
break;
}
- // +4MB
- req_addr += 4 * 1024 * 1024;
} while (req_addr < probe_region_end);
// On MacOS and other platforms