On Saturday 01 May 2010, Frank Mehnert wrote:
> On Saturday 01 May 2010, TwoThe wrote:
> > Type: Bug
> > Severity: major, ressource leak
> > Component: VirtualBox OSE
> > Host: Ubuntu 64
> >
> > In file vbox/src/libs/xpcom18a4/nsprpub/pr/src/threads/prcmon.c:
> >
> > #136 p = (MonitorCacheEntry*)
> > 137 PR_REALLOC(new_entries, added *
> > sizeof(MonitorCacheEntry)); 138 if (p == 0) {
> > 139 /*
> > 140 ** Total lossage. We just leaked a bunch of system
> > monitors 141 ** all over the floor. This should never ever
> > happen. 142 */
> > 143 PR_ASSERT(p != 0);
> > 144 return PR_FAILURE;
> > 145 }
> > 146 }
> > 147
> > 148 /*
> > 149 ** Now that we have allocated all of the system monitors, build
> > up 150 ** the new free list. We can just update the free_list because
> > we own 151 ** the mcache-lock and we aren't calling anyone who might
> > want to use 152 ** it.
> > 153 */
> > !154 for (i = 0, p = new_entries; i < added - 1; i++, p++)
> >
> > In line 136 memory is allocated and assigned to p. In line 154 the value
> > of p is overwritten and the memory pointed to before is never freed.
>
> Thank you for this report!
>
> Your observation is correct and we will fix the code. However, this
> path shouldn't be used in real life because if PR_CALLOC we will
> probably loose at other places too.Fixed in SVN r28971. Kind regards, Frank -- Dr.-Ing. Frank Mehnert Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten Amtsgericht München: HRB 161028 Geschäftsführer: Jürgen Kunz
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ vbox-dev mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-dev
