From nobody Tue Jun 01 06:52:17 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E4AF9BFD0B1 for ; Tue, 1 Jun 2021 06:52:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FvNBS5xRfz3hjT for ; Tue, 1 Jun 2021 06:52:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B33B41EEC0 for ; Tue, 1 Jun 2021 06:52:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1516qGon018712 for ; Tue, 1 Jun 2021 06:52:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1516qGH4018711 for bugs@FreeBSD.org; Tue, 1 Jun 2021 06:52:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 256211] valgrind shows one leak every time Date: Tue, 01 Jun 2021 06:52:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pjfloyd@wanadoo.fr X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256211 --- Comment #1 from Paul Floyd --- There is no problem here. If you run Valgrind with -s you will get --4534-- used_suppression: 1 MEMCHECK-LIBC-REACHABLE /usr/local/libexec/valgrind/default.supp:589 suppressed: 4,096 bytes in 1 blocks That means that the 4k still in use is known and suppressed by the system suppressions file If you run Valgrind with --defaut-suppressions=3Dno then you will see =3D=3D4537=3D=3D 4,096 bytes in 1 blocks are still reachable in loss record= 1 of 1 =3D=3D4537=3D=3D at 0x484C8A4: malloc (in /usr/local/libexec/valgrind/vgpreload_memcheck-amd64-freebsd.so) =3D=3D4537=3D=3D by 0x4974AA3: ??? (in /lib/libc.so.7) =3D=3D4537=3D=3D by 0x4987278: ??? (in /lib/libc.so.7) =3D=3D4537=3D=3D by 0x497B012: ??? (in /lib/libc.so.7) =3D=3D4537=3D=3D by 0x497AD89: vfprintf_l (in /lib/libc.so.7) =3D=3D4537=3D=3D by 0x4975AF3: printf (in /lib/libc.so.7) =3D=3D4537=3D=3D by 0x201D48: main (example.c:16) In theory it would be possible to remove this suppression by modifying libc= . On Linux, GNU libc has a __libc_freeres function, In normal use, Linux GNU libc applications do not call this function. Valgrind does some fiddling on guest application termination and _does_ call thisa function. The advantages of u= sing freeres over suppressions are that a) it is slighlty cleaner b) it is less sensitive (suppressions tend to change over time and libc cou= ld add more uses of reachable memory). If this really bothers you, open a bugzilla item for libc to add a freeres function and then I can add that to Valgrind. --=20 You are receiving this mail because: You are the assignee for the bug.=