summaryrefslogtreecommitdiff
path: root/src/trace/heap_test.zig
Commit message (Collapse)AuthorAge
* symbols: a library's separate debug info, when it is of the same buildGabriel Schneider5 days
| | | | | | | | | | | | | | | The system glibc stays dynamically linked and is symbolized from the debug file in the debuginfod client's cache or under /usr/lib/debug, used only when its own build id equals the mapped library's; nothing is downloaded. Static functions get names (the loader's resolver is _dl_runtime_resolve_xsavec; main_arena is found by symbol), libc's frames their file and line as the build saw them, and locals, blocks and parameter counts follow. A recording says of each module its build id and where its names came from; ztrace show prints it. Read only when an address in the module needs a name: 44 ms and 25 MB at the first one. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
* trace: names for PLT stubs and GOT slots; a call followed down; the vDSO is ↵Gabriel Schneider6 days
| | | | | | | | | | | | | | | | | | | | run through For a disassembly that follows a call into libc. A stub is open@plt and a slot open@got, from the relocations (libc's own, IFUNC and nameless, by the function they resolve to); telescope.got says what a slot holds and whether it is still lazy. A library function's entry is named even when its mapping was not known yet, by the alias the program imports. The chain holds through the stub's jump, the callee's first instruction, the syscall and the loader's resolver: ld.so's unwind section lacks the entry that ends it, which lost every frame there. A syscall is tied to its instruction's moment, and each frame's call is recorded with the row before it. Stepped by instruction, a call into the vDSO is one moment and its return the next: its clock loop, single-stepped, made three million moments of three reads. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
* trace: glibc's heap, read from a recording at any momentGabriel Schneider6 days
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