mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
dwarf: fixup pointer cast
This commit is contained in:
parent
5781016c35
commit
adbc5bbdb3
@ -1862,11 +1862,11 @@ pub const ExceptionFrameHeader = struct {
|
|||||||
.data_rel_base = eh_frame_hdr_ptr,
|
.data_rel_base = eh_frame_hdr_ptr,
|
||||||
}, builtin.cpu.arch.endian()) orelse return badDwarf();
|
}, builtin.cpu.arch.endian()) orelse return badDwarf();
|
||||||
|
|
||||||
const fde_ptr = try readEhPointer(reader, self.table_enc, @sizeOf(usize), .{
|
const fde_ptr = math.cast(usize, try readEhPointer(reader, self.table_enc, @sizeOf(usize), .{
|
||||||
.pc_rel_base = @ptrToInt(&self.entries[stream.pos]),
|
.pc_rel_base = @ptrToInt(&self.entries[stream.pos]),
|
||||||
.follow_indirect = true,
|
.follow_indirect = true,
|
||||||
.data_rel_base = eh_frame_hdr_ptr,
|
.data_rel_base = eh_frame_hdr_ptr,
|
||||||
}, builtin.cpu.arch.endian()) orelse return badDwarf();
|
}, builtin.cpu.arch.endian()) orelse return badDwarf()) orelse return badDwarf();
|
||||||
|
|
||||||
// TODO: Should this also do isValidMemory(fde_ptr) + 11 (worst case header size)?
|
// TODO: Should this also do isValidMemory(fde_ptr) + 11 (worst case header size)?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user