From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 27 14:45:00 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 767F4106566B for ; Wed, 27 Jan 2010 14:45:00 +0000 (UTC) (envelope-from falkman@gamozo.org) Received: from epicblunt.blendfresh.net (epicblunt.blendfresh.net [97.107.136.32]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3078FC19 for ; Wed, 27 Jan 2010 14:44:59 +0000 (UTC) Received: from [192.168.1.131] (75-134-26-91.dhcp.mdsn.wi.charter.com [75.134.26.91]) (authenticated bits=0) by epicblunt.blendfresh.net (8.14.3/8.14.3) with ESMTP id o0REJ9iN028182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 27 Jan 2010 08:19:18 -0600 Message-ID: <4B604B43.7010203@gamozo.org> Date: Wed, 27 Jan 2010 08:18:43 -0600 From: Brandon Falk User-Agent: Thunderbird 2.0.0.23 (X11/20100126) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Leaks in libc? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 14:45:00 -0000 The simple program: #include #include int main() { puts("Apple cider"); return 0; } Yields the following result in valgrind: ==4703== Memcheck, a memory error detector ==4703== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==4703== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==4703== Command: ./a.out ==4703== Apple cider ==4703== ==4703== HEAP SUMMARY: ==4703== in use at exit: 4,096 bytes in 1 blocks ==4703== total heap usage: 1 allocs, 0 frees, 4,096 bytes allocated ==4703== ==4703== LEAK SUMMARY: ==4703== definitely lost: 0 bytes in 0 blocks ==4703== indirectly lost: 0 bytes in 0 blocks ==4703== possibly lost: 0 bytes in 0 blocks ==4703== still reachable: 0 bytes in 0 blocks ==4703== suppressed: 4,096 bytes in 1 blocks ==4703== ==4703== For counts of detected and suppressed errors, rerun with: -v ==4703== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Any ideas why the standard libraries are leaking like this? Is it perhaps a bug with valgrind, or maybe FreeBSD automatically cleans up so they took the cleanup out of their libc? FreeBSD 8.0 x86_64 Thanks, Brandon