diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-02-20 09:06:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 09:06:09 -0800 |
commit | ecd0cdaf820af789f355f1a18c31d6adfe8aad94 (patch) | |
tree | c8756096eec15a4debd1b777b35b7a89c9875436 /yjit/src/asm | |
parent | b326a5f3ddf97161039a15fbb49e25b512e6efc8 (diff) | |
download | ruby-ecd0cdaf820af789f355f1a18c31d6adfe8aad94.tar.gz |
YJIT: Fix assertion for partially mapped last pages (#7337)
Follows up [Bug #19400]
Diffstat (limited to 'yjit/src/asm')
-rw-r--r-- | yjit/src/asm/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit/src/asm/mod.rs b/yjit/src/asm/mod.rs index 1c43beae02..7f95270b78 100644 --- a/yjit/src/asm/mod.rs +++ b/yjit/src/asm/mod.rs @@ -423,7 +423,7 @@ impl CodeBlock { /// Convert an address range to memory page indexes against a num_pages()-sized array. pub fn addrs_to_pages(&self, start_addr: CodePtr, end_addr: CodePtr) -> Vec<usize> { let mem_start = self.mem_block.borrow().start_ptr().into_usize(); - let mem_end = self.mem_block.borrow().end_ptr().into_usize(); + let mem_end = self.mem_block.borrow().mapped_end_ptr().into_usize(); assert!(mem_start <= start_addr.into_usize()); assert!(start_addr.into_usize() <= end_addr.into_usize()); assert!(end_addr.into_usize() <= mem_end); |