malloc(3) leak detection gains backtraces

Author:
Source

Sponsored:

Atlas of AI: Power, Politics, and the Planetary Costs of Artificial Intelligence - Audiobook


Uncover the true cost of artificial intelligence.

Listen now, and see the system behind the screens before the future listens to you. = > Atlas of AI $0.00 with trial. Read by Larissa Gallagher


Otto Moerbeek (otto@), the author of OpenBSD’s
malloc(3)
implementation, has
comitted
another great feature – backtraces for leak detection:

CVSROOT:	/cvs
Module name:	src
Changes by:	otto@cvs.openbsd.org	2023/12/04 00:01:45

Modified files:
	lib/libc/stdlib: malloc.3 malloc.c 

Log message:
Save backtraces to show in leak dump. Depth of backtrace set by
malloc option D (aka 1), 2, 3 or 4.  No performance impact if not
used.  ok asou@

Otto’s
original message
to tech@
includes an example use of the feature.

Read more