Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Three memory leaks are detected by mdb and libumem with your code here:</p> <pre><code>cat &gt; leak.c &lt;&lt;% int main() { void *buff; buff = malloc(128); buff = malloc(60); buff = malloc(30); buff = malloc(16); free(buff); sleep(180); } % gcc -g leak.c -o leak pkill leak UMEM_DEBUG=default UMEM_LOGGING=transaction LD_PRELOAD=libumem.so.1 leak &amp; sleep 5 rm -f core.leak.* gcore -o core.leak $(pgrep leak) mdb leak core.leak.* &lt;&lt;% ::findleaks -d % gcore: core.leak.1815 dumped CACHE LEAKED BUFCTL CALLER 0807f010 1 0808b4b8 main+0x29 0807d810 1 0808d088 main+0x39 0807d010 1 08092cd0 main+0x49 ------------------------------------------------------------------------ Total 3 buffers, 280 bytes umem_alloc_160 leak: 1 buffer, 160 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS 808b4b8 8088f28 1af921ab662 1 807f010 806c000 0 libumem.so.1`umem_cache_alloc_debug+0x144 libumem.so.1`umem_cache_alloc+0x19a libumem.so.1`umem_alloc+0xcd libumem.so.1`malloc+0x2a main+0x29 _start+0x83 umem_alloc_80 leak: 1 buffer, 80 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS 808d088 808cf68 1af921c11eb 1 807d810 806c064 0 libumem.so.1`umem_cache_alloc_debug+0x144 libumem.so.1`umem_cache_alloc+0x19a libumem.so.1`umem_alloc+0xcd libumem.so.1`malloc+0x2a main+0x39 _start+0x83 umem_alloc_40 leak: 1 buffer, 40 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS 8092cd0 808efc8 1af921f2bd2 1 807d010 806c0c8 0 libumem.so.1`umem_cache_alloc_debug+0x144 libumem.so.1`umem_cache_alloc+0x19a libumem.so.1`umem_alloc+0xcd libumem.so.1`malloc+0x2a main+0x49 _start+0x83 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload