[PATCH] test-skeleton.c: Do not enable M_PERTURB

Mike Frysinger vapier@gentoo.org
Thu Jun 23 19:31:00 GMT 2016


On 23 Jun 2016 17:05, Florian Weimer wrote:
> On 06/23/2016 04:49 PM, Siddhesh Poyarekar wrote:
> > On Thu, Jun 23, 2016 at 04:40:42PM +0200, Florian Weimer wrote:
> >> Over all, this decreases the realism of the tests because
> >> it ensures that freshly allocated memory has a well-defined
> >> bit pattern.  It also causes malloc to take internal paths
> >> different from regular application usage, and therefore
> >> reduces malloc test coverage.
> >
> > The well-defined bit pattern is more likely to catch any bad tests
> > though, which might make it valuable.
> 
> It could also cover up bugs which would otherwise be visible with fresh 
> allocations which contain only zeros.

while certainly true, i think this is much less common of an edge case.
code that happens to work because it happened to get zero-ed memory is,
in my experience, way less common than code that happens to work because
it happened to get garbage initially.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160623/f657a912/attachment.sig>


More information about the Libc-alpha mailing list