From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74885 invoked by alias); 8 Aug 2019 17:14:51 -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 74565 invoked by uid 89); 8 Aug 2019 17:14:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.51.162) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Aug 2019 17:14:49 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 1F3F5C1884 for ; Thu, 8 Aug 2019 12:14:24 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id vlzchliHM2qH7vlzchmBdW; Thu, 08 Aug 2019 12:14:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Hj1Lfu9px6CJbZuSh1yu7FrBoc56RP+v4lxlVa0WbKU=; b=tKTEvrW5u+8sDWVvOSxz4+vxM+ C6XB80o0ZaVVwrKx8KWlPpLaXiG0Cg34Q6qlc21gVA9YKdVUqo6JuBSXJSBa8uCTU/Dw3VYnY7pZm lOv7DGqiOEuI5uriMO7HfGYUA; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:34944 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hvlzb-002An1-RF; Thu, 08 Aug 2019 12:14:23 -0500 From: Tom Tromey To: Pedro Franco de Carvalho Cc: gdb-patches@sourceware.org, kevinb@redhat.com Subject: Re: [PATCH] Fix access to uninitialized variable in fill_in_stop_func References: <20190808135443.10894-1-pedromfc@linux.ibm.com> Date: Thu, 08 Aug 2019 17:14:00 -0000 In-Reply-To: <20190808135443.10894-1-pedromfc@linux.ibm.com> (Pedro Franco de Carvalho's message of "Thu, 8 Aug 2019 10:54:43 -0300") Message-ID: <87lfw360lt.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-08/txt/msg00205.txt.bz2 >>>>> "Pedro" == Pedro Franco de Carvalho writes: Pedro> This patch changes fill_in_stop_func to check the return value of Pedro> find_pc_partial_function before accessing the block pointer that is only Pedro> written by find_pc_partial_function if it returns a success status. Pedro> gdb/ChangeLog: Pedro> YYYY-MM-DD Pedro Franco de Carvalho Pedro> * infrun.c (fill_in_stop_func): Use return value of Pedro> find_pc_partial_function, remove comment. The comment for find_pc_partial_function says: nullptr is used as a return value for *BLOCK if no block is found. ... which implies to me that the function was intended to set *BLOCK unconditionally. Perhaps Kevin could say, as I think he added the block parameter. Tom