From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95403 invoked by alias); 14 May 2019 22:10:48 -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 95391 invoked by uid 89); 14 May 2019 22:10:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 May 2019 22:10:46 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 5F6E891A80 for ; Tue, 14 May 2019 17:10:45 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id QfdFhcaQE90onQfdFhiQbE; Tue, 14 May 2019 17:10:45 -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=6kH6Ry9y5KUK/eE6od5AD2OeV+npjpepr/44VT7ih2Q=; b=w973/1hkI9bJsiSMTDeEj7P3p9 yptihK9sHJ1kV4xh2OtZXNiwYpPhZVzI8eBYeFmX9maJuKXhfWAtgSuZsIhdYcJkkmMOmhPaFZ9Zu HPymhSwoZtzfbb1AK0as0CA2U; Received: from 97-122-168-123.hlrn.qwest.net ([97.122.168.123]:57752 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hQfdF-001fgp-1q; Tue, 14 May 2019 17:10:45 -0500 From: Tom Tromey To: Sergio Durigan Junior Cc: GDB Patches Subject: Re: [PATCH] Don't crash if dwarf_decode_macro_bytes's 'body' is NULL References: <871s124foc.fsf@tromey.com> <20190514205458.28796-1-sergiodj@redhat.com> Date: Tue, 14 May 2019 22:10:00 -0000 In-Reply-To: <20190514205458.28796-1-sergiodj@redhat.com> (Sergio Durigan Junior's message of "Tue, 14 May 2019 16:54:58 -0400") Message-ID: <871s108z6j.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-05/txt/msg00341.txt.bz2 >>>>> "Sergio" == Sergio Durigan Junior writes: Sergio> OK for master? Sergio> gdb/ChangeLog: Sergio> 2019-05-14 Sergio Durigan Junior Sergio> Ref.: https://bugzilla.redhat.com/show_bug.cgi?id=1708192 Sergio> * dwarf2read.c (dwarf_decode_macro_bytes): Check whether 'body' is Sergio> NULL, and complain if that's the case. Sergio> + complaint (_("debug info gives %s invalid macro definition " Sergio> + "without body (corrupted?) at line %d"), Sergio> + at_commandline ? _("command-line") Sergio> + : _("in-file"), Sergio> + line == 0 ? _("zero") : _("non-zero"), line); This seems weird since it doesn't use current_file, and if I'm reading correctly, there are 3 arguments but only 2 % substitutions. The compiler should catch the latter, so that's doubly strange. I think for a complaint it's fine to emit a line==0 or whatever, mostly it's for helping to track down the incorrect spot. Tom