From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54131 invoked by alias); 19 May 2015 13:43:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 54117 invoked by uid 89); 19 May 2015 13:43:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 19 May 2015 13:43:02 +0000 Received: by padbw4 with SMTP id bw4so25488491pad.0 for ; Tue, 19 May 2015 06:43:00 -0700 (PDT) X-Received: by 10.68.224.72 with SMTP id ra8mr54262482pbc.29.1432042980482; Tue, 19 May 2015 06:43:00 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id v4sm12778692pbs.0.2015.05.19.06.42.58 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 19 May 2015 06:42:59 -0700 (PDT) From: Yao Qi To: Jan Kratochvil Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [patch] Fix ASAN crash for gdb.compile/compile.exp References: <20150418170138.GA9123@host1.jankratochvil.net> <867fs4ssb6.fsf@gmail.com> <20150519123536.GA27983@host1.jankratochvil.net> Date: Tue, 19 May 2015 13:43:00 -0000 In-Reply-To: <20150519123536.GA27983@host1.jankratochvil.net> (Jan Kratochvil's message of "Tue, 19 May 2015 14:35:36 +0200") Message-ID: <86y4kkr8de.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00486.txt.bz2 Jan Kratochvil writes: > Now compile_object_run() called from line > (gdb) compile code puts("hello") > has finished for a long time. But we still need to have that injected co= de > OBJFILE valid when GDB is executing it. Therefore OBJFILE is freed only = from > destructor of the frame #1. Hmm, you are right. > > At the patched line of call_function_by_hand_dummy() the dummy frame > destructor has not yet been run but it will be run before the fetched NAME > will get used. > > In fact I do not see now how to fix it differently than what the patch do= es. Your patch is fine by me. --=20 Yao (=E9=BD=90=E5=B0=A7)