From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43440 invoked by alias); 27 Mar 2015 19:15:20 -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 43402 invoked by uid 89); 27 Mar 2015 19:15:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 27 Mar 2015 19:15:16 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id A7.67.17241.33A45155; Fri, 27 Mar 2015 13:16:51 +0100 (CET) Received: from [142.133.110.232] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.80) with Microsoft SMTP Server id 14.3.210.2; Fri, 27 Mar 2015 15:15:13 -0400 Message-ID: <5515AC41.1040907@ericsson.com> Date: Fri, 27 Mar 2015 19:15:00 -0000 From: Simon Marchi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jan Kratochvil , Subject: Re: [obv] Code cleanup: Move print_command_1 expr variable scope References: <20150326174630.GA3349@host1.jankratochvil.net> In-Reply-To: <20150326174630.GA3349@host1.jankratochvil.net> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00921.txt.bz2 Hi Jan, I think this patch is wrong. Starting with that commit (f30d5c7), some tests (e.g. mi-break.exp) started to fail for me, because of gdb segfaulting. Backtrace here: http://paste.ubuntu.com/10690836/ The address of expr is passed to the cleanup. When the cleanup is ran, expr is no longer in scope, so what is at that address is probably not safe to use anymore. That's my guess. Simon