aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/SelfInfo.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-09-03 13:58:41 +0100
committermlugg <mlugg@mlugg.co.uk>2025-09-30 13:44:50 +0100
commitdd9cb1beead2d0b9a22decf089aadf51cfe90da8 (patch)
tree13ea9b98876cf8409bb2123eccccf9cf7014a6fa /lib/std/debug/SelfInfo.zig
parent5e6a1919c730f7c3ad27b9e5c3ddc8938fc2f43f (diff)
downloadzig-dd9cb1beead2d0b9a22decf089aadf51cfe90da8.tar.gz
zig-dd9cb1beead2d0b9a22decf089aadf51cfe90da8.zip
doc comments
Diffstat (limited to 'lib/std/debug/SelfInfo.zig')
-rw-r--r--lib/std/debug/SelfInfo.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig
index 77d68fe68e..9fa57208e1 100644
--- a/lib/std/debug/SelfInfo.zig
+++ b/lib/std/debug/SelfInfo.zig
@@ -290,8 +290,10 @@ pub const UnwindContext = struct {
) orelse return error.MissingDebugInfo;
const format, const cie, const fde = try unwind.getFde(fde_offset, @sizeOf(usize), native_endian);
- // Check if this FDE *actually* includes the address.
- if (pc_vaddr < fde.pc_begin or pc_vaddr >= fde.pc_begin + fde.pc_range) return error.MissingDebugInfo;
+ // Check if the FDE *actually* includes the pc (`lookupPc` can return false positives).
+ if (pc_vaddr < fde.pc_begin or pc_vaddr >= fde.pc_begin + fde.pc_range) {
+ return error.MissingDebugInfo;
+ }
// Do not set `compile_unit` because the spec states that CFIs
// may not reference other debug sections anyway.