Live data from Hacker News

Show HN: Heap Explorer

github.com

1–6 of 6 posts

Show HN: Heap Explorer

#1
I wrote a little LD_PRELOAD library that makes it easy to inspect and interact with a running program's glibc heap.

It's fun to pause processes, free a bunch of their allocations, then resume them. Most of the time, the processes continue as though nothing happened, but sometimes they do interesting things :)

Show HN: Heap Explorer
github.com

Re: Show HN: Heap Explorer

#5
Would be nice to mention how to determine those *_OFFSET constants. For reference, on my linux mint (glibc 2.39) system this gives them:

    gdb /lib/x86_64-linux-gnu/libc.so.6 -ex 'p &main_arena' -ex 'p malloc'
Also, can attach to an existing process via:

    sudo gdb -p  -ex 'call (void*) dlopen("/path/to/libheap_explorer.so", 2)' -ex 'p explore_heap()'