diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 23:04:17 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 23:25:40 -0300 |
| commit | 58643dab07a803dbb579d84f68419911f5a2a16d (patch) | |
| tree | b97c9ab4f5ccd27448ecb609ea8879a42a8fe992 /src/trace/root.zig | |
| parent | b4ab1d770edb06d3eeebfd290bbf97725e55b7fa (diff) | |
| download | computeranim-58643dab07a803dbb579d84f68419911f5a2a16d.tar.gz computeranim-58643dab07a803dbb579d84f68419911f5a2a16d.zip | |
trace: glibc's heap, read from a recording at any moment
record --heap keeps the arena, the tcache and, of every chunk, its size
word and the links of those on a list: free chunks stay readable, which
--alloc dropped at the free. zt.heap.glibc gives the chunks in address
order, the tcache's and the bins' chains (safe-linking as the stored
value and the pointer it protects), the top; each with the address of
the word it was read from, each chain saying how it ended. ztrace show
prints it. Layouts for glibc 2.44 (no fastbins; a tcache made at the
first free, counting the slots left) and 2.40; the arena found by symbol
or by the struct whose next points at itself. Against pwndbg on 2.40:
the same at every stop. Three bytes a moment and a sixth slower on the
list by instruction.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'src/trace/root.zig')
| -rw-r--r-- | src/trace/root.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/trace/root.zig b/src/trace/root.zig index 88e2935..ef684db 100644 --- a/src/trace/root.zig +++ b/src/trace/root.zig @@ -11,6 +11,8 @@ pub const Trace = store.Trace; pub const ptrace = @import("ptrace.zig"); /// Pointers followed through a moment, pwndbg's way. pub const telescope = @import("telescope.zig"); +/// glibc's malloc at a moment: chunks, tcache, bins, the top. +pub const heap = @import("heap.zig"); pub const Debugger = @import("Debugger.zig"); pub const Symbols = @import("Symbols.zig"); pub const syscalls = @import("syscalls.zig"); @@ -31,6 +33,7 @@ test { _ = store; _ = ptrace; _ = telescope; + _ = heap; _ = Debugger; _ = Symbols; _ = syscalls; |
