mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 04:25:05 +00:00
check result of mmap() call to handle a large base_addr value correctly
This commit is contained in:
parent
1423b38c45
commit
9025f73733
@ -516,7 +516,7 @@ pub fn initStatic(phdrs: []elf.Phdr) void {
|
||||
-1,
|
||||
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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user