From 6c25d2bd58e4b5a002a7d1cd2882dd4e7ef23b6f Mon Sep 17 00:00:00 2001 From: Thibault Leclercq Date: Fri, 17 Jul 2026 18:27:47 +0200 Subject: [PATCH] std.debug.SelfInfo.Elf: clear unwind cache when rebuilding module list --- lib/std/debug/SelfInfo/Elf.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/std/debug/SelfInfo/Elf.zig b/lib/std/debug/SelfInfo/Elf.zig index 7a81b4cba894fd238d72e5e1c74cdc3df8ae176a..eb60162dcb405709a7468e97ea4b755aaefe2d90 100644 --- a/lib/std/debug/SelfInfo/Elf.zig +++ b/lib/std/debug/SelfInfo/Elf.zig @@ -428,6 +428,9 @@ fn findModule(si: *SelfInfo, gpa: Allocator, io: Io, address: usize, lock: enum // Rebuild module list with the exclusive lock. { errdefer si.rwlock.unlock(io); + if (si.unwind_cache) |cache| { + @memset(cache, .empty); + } for (si.modules.items) |*mod| { unwind: { const u = &(mod.unwind orelse break :unwind catch break :unwind); -- 2.54.0