Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2012 21:37:46 GMT
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/172577: hwpmc can leak memory on unload
Message-ID:  <201210102137.q9ALbk23054399@red.freebsd.org>
Resent-Message-ID: <201210102258.q9AMwShc003810@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210102137.q9ALbk23054399>