~/talk

Finding Hidden Memory Bugs in PostgreSQL with Custom Memory Allocators

Talkat PGConf India 2026 · 2026-03-11..03-13· [databases]
links:none on file
slides:none on file

A custom malloc-based allocator bypasses AllocSet freelists and routes allocations through the system allocator so ASan poisoning actually happens; integrating it as a memory-context implementation lets AddressSanitizer flag real frees during normal regression runs. The method uncovers three critical use-after-free bugs across PostgreSQL v16–v18, produces allocation/deallocation/access stacks, and results in upstream fixes; the allocator is slower by design but reliably exposes freelist-hidden lifetime bugs.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:11PostgreSQL memory contexts
  3. 3:23Memory issues in PostgreSQL
  4. 7:16PostgreSQL allocators overview
  5. 9:04AddressSanitizer limitations
  6. 13:01PostgreSQL memory safety tools
  7. 16:38Custom memory context solution
  8. 20:38Bugs found in PostgreSQL
  9. 24:10AddressSanitizer benefits
  10. 26:18Key takeaways
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.