This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #12140] Add note on free list pointers overwritingM_PERTURB bytes
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org, mtk dot manpages at gmail dot com
- Date: Wed, 17 Oct 2012 21:16:14 +0530
- Subject: Re: [PATCH][BZ #12140] Add note on free list pointers overwritingM_PERTURB bytes
- References: <20121017191058.60cbb4ed@spoyarek><20121017150253.9AFEE2C0B4@topped-with-meat.com>
On Wed, 17 Oct 2012 08:02:53 -0700 (PDT), Roland wrote:
> Use @theglibc{} and so forth, never "glibc". Or just say, "the
> @code{free} function". But if there was a need to say this, then
> perhaps there's a need to reword to be even more clear. The option
> never guarantees that you can find any particular byte values in
> freed space. What it guarantees is that the contents the block had
> before it was freed will be overwritten.
OK thanks. Here's the updated blurb, which is pretty much lifted from
what you said. Good enough to go in?
Siddhesh
diff --git a/manual/memory.texi b/manual/memory.texi
index fba3a2c..5b14aa6 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -706,7 +706,10 @@ to zero disables all use of @code{mmap}.
If non-zero, memory blocks are filled with values depending on some
low order bits of this parameter when they are allocated (except when
allocated by @code{calloc}) and freed. This can be used to debug the
-use of uninitialized or freed heap memory.
+use of uninitialized or freed heap memory. Note that this option does not
+guarantee that the freed block will have any specific values. It only
+guarantees that the content the block had before it was freed will be
+overwritten.
@end table
@end deftypefun