Skip to content

Commit 4cdf8c4

Browse files
author
Jarl Evanson
committed
Fixed bug stemming from treating an exclusive range as an inclusive range
1 parent a6c86c3 commit 4cdf8c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: common/src/load_kernel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ where
269269
// map additional frames for `.bss` memory that is not present in source file
270270
let start_page: Page =
271271
Page::containing_address(VirtAddr::new(align_up(zero_start.as_u64(), Size4KiB::SIZE)));
272-
let end_page = Page::containing_address(zero_end);
272+
let end_page = Page::containing_address(zero_end - 1u64);
273273
for page in Page::range_inclusive(start_page, end_page) {
274274
// allocate a new unused frame
275275
let frame = self.frame_allocator.allocate_frame().unwrap();

0 commit comments

Comments
 (0)