From nobody Fri Oct 22 06:07:23 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 ABE561812569 for ; Fri, 22 Oct 2021 06:07:23 +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 4HbDQg4QY9z4hpT for ; Fri, 22 Oct 2021 06:07:23 +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 7478211E0 for ; Fri, 22 Oct 2021 06:07:23 +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 19M67Nbr039346 for ; Fri, 22 Oct 2021 06:07:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 19M67Niw039345 for bugs@FreeBSD.org; Fri, 22 Oct 2021 06:07:23 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 259294] [libc] add a freeres function Date: Fri, 22 Oct 2021 06:07:23 +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: Unspecified 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=3D259294 --- Comment #1 from Paul Floyd --- I'll see if I can work out a patch. In the meantime, here is the canonical C example #include int main(void) { printf("Hellw, World!\n"); } If I run valgrind --default-suppressions=3Dno --leak-check=3Dfull --show-reachable= =3Dyes ./hello_world then I get =3D=3D1497=3D=3D 4,096 bytes in 1 blocks are still reachable in loss record= 1 of 1 =3D=3D1497=3D=3D at 0x484C8A4: malloc (in /usr/local/libexec/valgrind/vgpreload_memcheck-amd64-freebsd.so) =3D=3D1497=3D=3D by 0x4974AA3: ??? (in /lib/libc.so.7) =3D=3D1497=3D=3D by 0x4987278: ??? (in /lib/libc.so.7) =3D=3D1497=3D=3D by 0x497B012: ??? (in /lib/libc.so.7) =3D=3D1497=3D=3D by 0x497AD89: vfprintf_l (in /lib/libc.so.7) =3D=3D1497=3D=3D by 0x4975AF3: printf (in /lib/libc.so.7) =3D=3D1497=3D=3D by 0x2018A8: main (hello_world.c:5) And for C++ the canonical hello world #include int main() { std::cout << "Hello, World!\n"; } valgrind --default-suppressions=3Dno --leak-check=3Dfull --show-reachable= =3Dyes ./hello_world2 =3D=3D1507=3D=3D 4,096 bytes in 1 blocks are still reachable in loss record= 1 of 1 =3D=3D1507=3D=3D at 0x484C8A4: malloc (in /usr/local/libexec/valgrind/vgpreload_memcheck-amd64-freebsd.so) =3D=3D1507=3D=3D by 0x4AB5AA3: ??? (in /lib/libc.so.7) =3D=3D1507=3D=3D by 0x4AC8278: ??? (in /lib/libc.so.7) =3D=3D1507=3D=3D by 0x4AB47D2: ??? (in /lib/libc.so.7) =3D=3D1507=3D=3D by 0x4AB50A3: fwrite (in /lib/libc.so.7) =3D=3D1507=3D=3D by 0x202C08: std::__1::basic_streambuf >::sputn(char const*, long) (include/c++/v1/streambuf:229) =3D=3D1507=3D=3D by 0x202A1F: std::__1::ostreambuf_iterator > std::__1::__pad_and_output >(std::__1::ostreambuf_iterator >, char const*, char const*, char const*, std::__1::ios_base&, char) (include/c++/v1/locale:1411) =3D=3D1507=3D=3D by 0x202725: std::__1::basic_ostream >& std::__1::__put_character_sequence >(std::__1::basic_ostream >&, char const*, unsigned long) (include/c++/v1/ostream:730) =3D=3D1507=3D=3D by 0x20260B: std::__1::basic_ostream >& std::__1::operator<< >(std::__1::basic_ostream >&, char const*) (include/c++/v1/ostream:869) While looking at this, it strikes me that I'm not reading the libc debuginf= o. I need to investigate that. --=20 You are receiving this mail because: You are the assignee for the bug.=