OpenBSD Journal

Call for Testing: ld.so Malloc Improvements

Contributed by tbert on from the loading-the-dice dept.

Otto Moerbeek (otto@) continues his mastery of all things memory allocation, extending some of the libc malloc features to ld.so(1):

ld.so has a very basic malloc. This diff changes it to use a (somewhat stripped) libc malloc with all the randomization and other goodness.

The diff has malloc, free and calloc, no realloc. A next sweep would actually use calloc (and reallocarray) in ld.so. It currently only uses malloc (with zero filling!), but there's room for improvement here.

I only tested this on sparc64. Please help and test this on various platforms.

Keep a root shell and a copy of ld.so handy in case it blows up.

Note carefully the warnings about root shell and spare copy of ld.so around during testing. You can pull the raw patch here.

(Comments are closed)


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.]