OpenBSD Journal

OpenBSD's built-in memory leak detection

Contributed by rueda on from the staying-afloat dept.

As announced on the misc@ mailing list, Otto Moerbeek (otto@), the author of OpenBSD's malloc(3) implementation [a.k.a. "otto malloc"], has written a tutorial on the new malloc(3) leak detection available in OpenBSD 7.4

Read it at: OpenBSD's built-in memory leak detection

Since the publication of that write-up, Otto has committed further enhancements:

CVSROOT:	/cvs
Module name:	src
Changes by:	otto@cvs.openbsd.org	2023/10/22 06:19:26

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

Log message:
When option D is active, store callers for all chunks; this avoids
the 0x0 call sites for leak reports. Also display more info on
detected write of free chunks: print the info about where the chunk
was allocated, and for the preceding chunk as well.
ok asou@

(Comments are closed)


Comments
  1. By Sylvain (2001:861:2c22:4580:9424:a15d:d6c0:155a) on linktr.ee/Sylvain

    enchancements ... you meant “enchantments” perhaps ? :)

    Comments
    1. By grey (grey) on http://www.artkiver.com

      I corrected it to "enhancements" but I appreciate your suggestion along the lines of Arthur C. Clarke's "Any sufficiently advanced technology is indistinguishable from magic." ;)

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]