mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
check result of mmap() call to handle a large base_addr value correctly
This commit is contained in:
parent
1423b38c45
commit
9025f73733
1 changed files with 1 additions and 1 deletions
|
|
@ -516,7 +516,7 @@ pub fn initStatic(phdrs: []elf.Phdr) void {
|
||||||
-1,
|
-1,
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
if (@as(isize, @bitCast(begin_addr)) < 0) @trap();
|
if (@call(.always_inline, linux.E.init, .{begin_addr}) != .SUCCESS) @trap();
|
||||||
|
|
||||||
const area_ptr: [*]align(page_size_min) u8 = @ptrFromInt(begin_addr);
|
const area_ptr: [*]align(page_size_min) u8 = @ptrFromInt(begin_addr);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue