From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 797FD386103A for ; Wed, 17 Mar 2021 20:47:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 797FD386103A Received: by mail-pj1-x1032.google.com with SMTP id ot17-20020a17090b3b51b0290109c9ac3c34so1599805pjb.4 for ; Wed, 17 Mar 2021 13:47:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fkJP1kGInekDxIYcx2fhWFwp7P92iQ+CcTbYNEAWido=; b=QIuVPP4259GilpAixgbIyeAA0FsCndiHv0jtqiBfuEJP+G0YovxrspdVgJqaZLhrfY NEFvEd1bwPzJEQWdKLehRih25kNOTQulL++R9g16DffzaXzep7aTZHy3X+kOMXJLCCCr +xhnqxiojZN/S8z2rMGjDx/LfRU1kxwybBXG51v5zxOz+wj7RCdLvvJj4R1M0q99xaN+ F1zXk/XXvVyf19vzdzUssJ+cZaUbuYwXE7NtWB+8EeCk6vGnTp7FWfqBSPm8aHBQ391f EVIhxmxEQ+vHagfMrDSP6zYJFc2vn1vzNXxIQcR4w4dhN2fjnhuks5CXLf0R1K78Tcf+ 74UA== X-Gm-Message-State: AOAM533WpQDOMmXg4hiltQNC6bj1vkxYkd5abcsG7jDqCA27L8RWU0LM qukC5xr4nZILUaIY+KIlFLzIN3EH1tzWamIfi57QLcqPWRU= X-Google-Smtp-Source: ABdhPJz8vL/OC2KHiBJfh2rgB4NKtHAhSjEg4wL/3+3XTA+cGvmX00VSLgIIHdfp9iOx3iVGypvK0J9ymSkm+5ZLqxM= X-Received: by 2002:a17:902:7e4a:b029:e5:d1cf:27e4 with SMTP id a10-20020a1709027e4ab02900e5d1cf27e4mr6097630pln.69.1616014062614; Wed, 17 Mar 2021 13:47:42 -0700 (PDT) MIME-Version: 1.0 References: <87h7l91xnu.fsf@oldenburg.str.redhat.com> In-Reply-To: <87h7l91xnu.fsf@oldenburg.str.redhat.com> From: Godmar Back Date: Wed, 17 Mar 2021 16:47:31 -0400 Message-ID: Subject: Re: Bug or not? printf allocates buffer & never frees it To: Florian Weimer Cc: Ian Pilcher via Libc-help , Ian Pilcher Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2021 20:47:44 -0000 On Wed, Mar 17, 2021 at 1:46 PM Florian Weimer via Libc-help wrote: > > What happens if you remove the muntrace call? I suspect you see this > leak because you are specifically telling glibc not to log the > deallocation. > Since you called this a `leak`, may I ask a question that is tangentially related? Is GNU libc designed to be used in environments that do not deallocate all memory upon exit(), i.e., environments that can call exit() multiple times without being provided with a fresh heap each time? I understand ISO C allows this and POSIX is quiet on this specific issue. Is complete deallocation of one-time buffers before exit() a design goal of GNU libc? - Godmar