Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 1996 15:44:29 +0200
From:      Poul-Henning Kamp <phk@critter.tfs.com>
To:        hackers@freebsd.org
Subject:   an easy way to help us improve -current
Message-ID:  <23861.845819069@critter.tfs.com>

next in thread | raw e-mail | index | archive | help

If you're looking for an easy way to help us improve FreeBSD, then
here's one way you can help:

There is undoubtedly still programs that mismanage memory allocated
with malloc(3).  Many of these will core dump when they make a mistake
provided you have set the right options for phkmalloc.

So if you don't mind a little bit of a slowdown, try this out:

	ln -sf AJ /etc/malloc.conf

If you suddenly see a program print a warning and core-dump, then
use the send-pr program to report the problem to us.  Of course we 
will be doubly happy if you include a fix too :-)  Most of these 
are easy bugs to find, so don't be afraid to take a stab at it.

If you find the problem in software from one of our many ports
you should direct the report to the original author of the program
and the maintainer of the freebsd port.

Please make sure that you include the fact that you set malloc.conf
to "Junk Abort" somewhere in the PR you send.

So what does this actually do ?

The 'J' means that memory you get from malloc is always filled with
"junk" before it is handed to you, and when you free memory back it
will be filled with junk again.  This of course slows things down,
but not much actually.

As default the byte value used for "junk" is 0xd0.  There are only 
a few cases where a pointer 0xd0d0d0d0 is valid, and as integers go
3503345872 doesn't seem too common either, so programs generally 
choke really fast after they get hold of one of these.

The 'A' means that any kind of trouble is reason for a core-dump.

Happy hunting!

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Future will arrive by its own means, progress not so.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?23861.845819069>