mirror of https://github.com/pwndbg/pwndbg.git
Fix stack.update caching bug (#1703)
The `pwndbg.gdblib.regs.sp` value is cached and its cache is cleared on a next stop, memory write or register write events. We keep a dictionary of stacks in Pwndbg, that are updated on each stop by the `stack.update` functionality which reused a cached stack pointer (`gdblib.regs.sp`) value. As a result, if we had more than one threads, the `pwndbg.gdblib.stacks.stacks` reported the same stack address for all threads and then the `canary` command printed the same addresses N times where N is the number of threads that were running. This commit fixes this bug by clearing up the registers cache when we switch into a different thread in the loop in the `stacks.update` function.pull/1708/head
parent
3bc91c1cb2
commit
e77c6f5c2e
Loading…
Reference in new issue