pwndbg_try_free
Simulate glibc's free() on a given address to determine which checks pass or fail, aiding in debugging heap exploits.
Instructions
Simulate what would happen if free() were called on an address.
pwndbg command: try_free Source: pwndbg/commands/ptmalloc2.py Category: GLibc ptmalloc2 Heap
Walks through glibc's free() logic and reports which checks would pass or fail. Invaluable for debugging heap exploits — shows exactly why a crafted chunk would or wouldn't pass free()'s validation.
Args: session_id: The UUID of the session. addr: Address to simulate freeing.
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/ptmalloc2/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"addr": "<addr>"
},
"name": "pwndbg_try_free"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| addr | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |