sanity check heuristic heap tcache detection
Author: k4lizenCreated Sep 14, 2026Updated Sep 14, 2026
In the docstring it says:
@property
@override
def thread_cache(self) -> pwndbg.aglib.heap.glibc_structs.TcachePerthreadStruct | None:
"""Locate a thread's tcache struct. We try to find its address in Thread Local Storage (TLS) first,
and if that fails, we guess it's at the first chunk of the heap.
"""In the latest version of glibc, it may not be the first chunk of the heap. Does this heuristic still make sense, should we really be guessing this?
See related: https://github.com/pwndbg/pwndbg/pull/4133#issuecomment-5634278059 .
Source: pwndbg/pwndbg