Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2025 21:01:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 282576] Memory leak in sysctlbyname FreeBSD 14.1-RELEASE-p5 GENERIC x64
Message-ID:  <bug-282576-227-wCnYWnol4X@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-282576-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282576

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|secteam@FreeBSD.org         |bugs@FreeBSD.org
         Resolution|---                         |Not A Bug
                 CC|                            |markj@FreeBSD.org
             Status|New                         |Closed

--- Comment #2 from Mark Johnston <markj@FreeBSD.org> ---
markj@xinde> valgrind -s ./a.out 
==21570== Memcheck, a memory error detector
==21570== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==21570== Using Valgrind-3.24.0 and LibVEX; rerun with -h for copyright info
==21570== Command: ./a.out
==21570== 
FreeBSD Kernel Version: FreeBSD 15.0-CURRENT #322 main-n275473-5778cbdae761:
Sun Feb 16 05:03:29 UTC 2025
    root@pkg-main:/usr/obj/root/freebsd/amd64.amd64/sys/GENERIC-NODEBUG

==21570== 
==21570== HEAP SUMMARY:
==21570==     in use at exit: 4,096 bytes in 1 blocks
==21570==   total heap usage: 2 allocs, 1 frees, 4,251 bytes allocated
==21570== 
==21570== LEAK SUMMARY:
==21570==    definitely lost: 0 bytes in 0 blocks
==21570==    indirectly lost: 0 bytes in 0 blocks
==21570==      possibly lost: 0 bytes in 0 blocks
==21570==    still reachable: 0 bytes in 0 blocks
==21570==         suppressed: 4,096 bytes in 1 blocks
==21570== 
==21570== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
--21570-- 
--21570-- used_suppression:      1 MEMCHECK-LIBC-REACHABLE-1
/usr/local/libexec/valgrind/default.supp:595 suppressed: 4,096 bytes in 1
blocks
==21570== 
==21570== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

The suppression in question is used for an allocation that happens in libc:

{
   MEMCHECK-LIBC-REACHABLE-1
   Memcheck:Leak
   match-leak-kinds: reachable
   fun:malloc
   obj:*/lib*/libc.so.7
   obj:*/lib*/libc.so.7
   obj:*/lib*/libc.so.7
   fun:vfprintf_l
}

Other than that, valgrind doesn't report any leaks.  Although you tested on
14.1, I strongly suspect that it's the same false positive there.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-282576-227-wCnYWnol4X>