[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-bugs
Subject: Re: bin/87729: most calls to malloc(3) generate warnings in valgrind
From: Bradley T Hughes <bhughes () trolltech ! com>
Date: 2005-10-20 15:24:15
Message-ID: 4357B69F.7050108 () trolltech ! com
[Download RAW message or body]
FreeBSD-gnats-submit@FreeBSD.org wrote:
> Thank you very much for your problem report.
> It has the internal identification `bin/87729'.
> The individual assigned to look at your
> report is: freebsd-bugs.
>
> You can access the state of your problem report at any time
> via this link:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=87729
>
>
>>Category: bin
>>Responsible: freebsd-bugs
>>Synopsis: most calls to malloc(3) generate warnings in valgrind
>>Arrival-Date: Thu Oct 20 15:20:18 GMT 2005
Here is the patch that I couldn't attach when using the web form.
--
Bradley T. Hughes - bhughes at trolltech.com
Trolltech AS - Waldemar Thranes gt. 98 N-0175 Oslo, Norway
["malloc.c.diff" (text/plain)]
--- malloc.c Wed Oct 19 13:30:01 2005
+++ malloc.c~ Wed Oct 19 13:29:01 2005
@@ -635,8 +635,11 @@
for(;k-i >= MALLOC_BITS; i += MALLOC_BITS)
bp->bits[i / MALLOC_BITS] = ~0;
- for(; i < k; i++)
- bp->bits[i/MALLOC_BITS] |= 1<<(i%MALLOC_BITS);
+ if (i < k) {
+ bp->bits[i/MALLOC_BITS] = 0;
+ for(; i < k; i++)
+ bp->bits[i/MALLOC_BITS] |= 1<<(i%MALLOC_BITS);
+ }
if (bp == bp->page) {
/* Mark the ones we stole for ourselves */
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic