From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florian Weimer Newsgroups: gmane.comp.lib.glibc.alpha,gmane.emacs.devel Subject: Re: Removal of unexec support from glibc malloc Date: Tue, 19 Jan 2016 11:14:25 +0100 Message-ID: <569E0C81.40501@redhat.com> References: <569CDB81.6040600@redhat.com> <569D3BE0.6050103@cs.ucla.edu> <569D4207.4060209@cs.ucla.edu> <83mvs2d5b2.fsf@gnu.org> <858u3meiv1.fsf@iznogoud.viz> <569D6A3E.2010009@cs.ucla.edu> <569D73D7.1080206@redhat.com> <569DD82B.20201@cs.ucla.edu> <569E017F.6090609@redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1453198491 1259 80.91.229.3 (19 Jan 2016 10:14:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jan 2016 10:14:51 +0000 (UTC) Cc: Eli Zaretskii , Emacs-devel@gnu.org, GNU C Library To: Paul Eggert Original-X-From: libc-alpha-return-66407-glibc-alpha=m.gmane.org@sourceware.org Tue Jan 19 11:14:42 2016 Return-path: Envelope-to: glibc-alpha@plane.gmane.org Original-Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aLTJ8-0006mj-DW for glibc-alpha@plane.gmane.org; Tue, 19 Jan 2016 11:14:38 +0100 DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=mwyJvFDLR5vDARrs GZ9wc+LkOV3lgMq0tiuNfPOMlwN5tVf0HKxfIh5MXJGg1eY1o7XxhyRewzSJiyCe Gb2x6KsxGbfcGMtOcVnMt3jHtV2ggcKnaY50/RueuLBVUKF4IGj8RVwmMCpQMvHJ WKdnIw8KuZPE7VseBYfSgSsYJP8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=jowsEHKUFYDgNRanAzUqzi eO0/M=; b=yBq5x9z/Xsr5uD6uKFNljux+aNQVG5tkPofEhSIdJjdbs+dc4V2DQK Vw+9Uyi6yK4pf6SDxyJ857IBng2+XXRdobpDLBHr4GCsmXWoWNi5KT0FzpMml0mV EEz4bH8EGYMLoozyPOHprrCeMCkYBq6DT2VmwNNoEQkEXlYdmBOek= Original-Received: (qmail 56234 invoked by alias); 19 Jan 2016 10:14:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: libc-alpha-owner@sourceware.org Original-Received: (qmail 56216 invoked by uid 89); 19 Jan 2016 10:14:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=iterates, marks X-HELO: mx1.redhat.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <569E017F.6090609@redhat.com> Xref: news.gmane.org gmane.comp.lib.glibc.alpha:58690 gmane.emacs.devel:198349 Archived-At: On 01/19/2016 10:27 AM, Florian Weimer wrote: > On 01/19/2016 07:31 AM, Paul Eggert wrote: > >>> With a bit of luck, newer valgrind versions will even recognize the >>> interposed malloc, simplifying leak detection. >> >> Wow, thanks, I didn't know that. I have been using valgrind only on >> temacs (the undumped, slow, and hard-to-use Emacs), because valgrind >> doesn't work on dumped emacs under GNU/Linux. > > With the new interposing-aware valgrind, valgrind still works, but > there's a memory allocation failure because valgrind detects an invalid > realloc and makes it return NULL, instead of forwarding it to the > implementation. > > We're looking at this to see if it's easy to fix in valgrind. This will not work until the undumping code iterates over all heap objects and marks them with VALGRIND_MALLOCLIKE_BLOCK. It's not exactly trivial (but not that hard, either). There might be secondary breakage after that. Florian