kern/172577: hwpmc can leak memory on unload
Mateusz Guzik
mjguzik at gmail.com
Wed Oct 10 22:58:28 UTC 2012
>Number: 172577
>Category: kern
>Synopsis: hwpmc can leak memory on unload
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 10 22:58:27 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Mateusz Guzik
>Release: head r241305
>Organization:
>Environment:
>Description:
On unload of hwpmc the following is reported:
Warning: memory type pmc leaked memory on destroy (2 allocations, 512 byt
es leaked).
Cause:
on load pmc_md_initialize() causes some buffers to be allocated
on unload the following code from pmc_cleanup is executed:
if (md->pmd_cputype == PMC_CPU_GENERIC)
pmc_generic_cpu_finalize(md);
else
pmc_md_finalize(md);
pmc_generic_cpu_finalize does not free any memory allocated by functions called by pmc_md_initialize.
>How-To-Repeat:
I have CPU: Intel(R) Core(TM)2 Duo CPU P9600 @ 2.66GHz (2660.06-MHz K8-class CPU) and ran the following in VirtualBox:
# kldload hwpmc
# kldunlod hwpmc
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list