| author | |
| committer | |
| log | 4adb7eca6ab2148026a9d2e00379cedfc2038a0d |
| tree | b5e6bb6bb2b392d152fda3396acd02c1924e68d5 |
| parent | 025611629f95cda21ff93a517406ea8387ad9cfb |
2 files changed, 4 insertions(+), 2 deletions(-)
lib/std/debug/Dwarf.zig+3-1| ... | @@ -402,7 +402,7 @@ pub const ExceptionFrameHeader = struct { | ... | @@ -402,7 +402,7 @@ pub const ExceptionFrameHeader = struct { |
| 402 | } | 402 | } |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | if (len == 0) return bad(); | 405 | if (len == 0) return missing(); |
| 406 | fbr.pos = left * entry_size; | 406 | fbr.pos = left * entry_size; |
| 407 | 407 | ||
| 408 | // Read past the pc_begin field of the entry | 408 | // Read past the pc_begin field of the entry |
| ... | @@ -460,6 +460,8 @@ pub const ExceptionFrameHeader = struct { | ... | @@ -460,6 +460,8 @@ pub const ExceptionFrameHeader = struct { |
| 460 | @sizeOf(usize), | 460 | @sizeOf(usize), |
| 461 | native_endian, | 461 | native_endian, |
| 462 | ); | 462 | ); |
| 463 | |||
| 464 | if (pc < fde.pc_begin or pc >= fde.pc_begin + fde.pc_range) return missing(); | ||
| 463 | } | 465 | } |
| 464 | }; | 466 | }; |
| 465 | 467 |
lib/std/debug/SelfInfo.zig+1-1| ... | @@ -1633,7 +1633,7 @@ pub fn unwindFrameDwarf( | ... | @@ -1633,7 +1633,7 @@ pub fn unwindFrameDwarf( |
| 1633 | &cie, | 1633 | &cie, |
| 1634 | &fde, | 1634 | &fde, |
| 1635 | ) catch |err| switch (err) { | 1635 | ) catch |err| switch (err) { |
| 1636 | error.InvalidDebugInfo => { | 1636 | error.MissingDebugInfo => { |
| 1637 | // `.eh_frame_hdr` appears to be incomplete, so go ahead and populate `cie_map` | 1637 | // `.eh_frame_hdr` appears to be incomplete, so go ahead and populate `cie_map` |
| 1638 | // and `fde_list`, and fall back to the binary search logic below. | 1638 | // and `fde_list`, and fall back to the binary search logic below. |
| 1639 | try di.scanCieFdeInfo(allocator, base_address); | 1639 | try di.scanCieFdeInfo(allocator, base_address); |