From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57847 invoked by alias); 9 Jul 2017 16:44:53 -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 57836 invoked by uid 89); 9 Jul 2017 16:44:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*Ad:U*tom, disagree, perfect X-HELO: gproxy10.mail.unifiedlayer.com Received: from gproxy10-pub.mail.unifiedlayer.com (HELO gproxy10.mail.unifiedlayer.com) (69.89.20.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 09 Jul 2017 16:44:51 +0000 Received: from CMOut01 (unknown [10.0.90.82]) by gproxy10.mail.unifiedlayer.com (Postfix) with ESMTP id C391014040D for ; Sun, 9 Jul 2017 10:44:49 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id igkm1v00E2f2jeq01gkpZK; Sun, 09 Jul 2017 10:44:49 -0600 X-Authority-Analysis: v=2.2 cv=FvB1xyjq c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=G3gG6ho9WtcA:10 a=3R8EgZKIWCqGpblrZl4A:9 Received: from c-67-176-62-53.hsd1.co.comcast.net ([67.176.62.53]:41182 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dUFKA-002bzF-8n; Sun, 09 Jul 2017 10:44:46 -0600 From: Tom Tromey To: Simon Marchi Cc: Simon Marchi , gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH] compile-loc2c: Fix uninitialized variable error References: <1497124148-11187-1-git-send-email-simon.marchi@ericsson.com> <3ec2d2df8170bea2b43c095996ad7278@polymtl.ca> Date: Sun, 09 Jul 2017 16:44:00 -0000 In-Reply-To: <3ec2d2df8170bea2b43c095996ad7278@polymtl.ca> (Simon Marchi's message of "Sun, 25 Jun 2017 19:24:06 +0200") Message-ID: <8760f1o8zm.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Exim-ID: 1dUFKA-002bzF-8n X-Source-Sender: c-67-176-62-53.hsd1.co.comcast.net (bapiya) [67.176.62.53]:41182 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-SW-Source: 2017-07/txt/msg00047.txt.bz2 >>>>> "Simon" == Simon Marchi writes: Sorry about the delay on this. I've been away. >> * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read >> address when op is DW_OP_addr. Simon> As you are the original author of that code, would it be possible for Simon> you to take a quick look, if you remember any of this :) ? This patch looks correct to me. I'm sure the earlier state was just an oversight. FWIW in gimli's DWARF expression code, I separated the format decoder from the evaluator to avoid this sort of problem. Each operation is decoded to an object; and then evaluation is done using the object. This isn't perfect, as different users of the decoded objects can still disagree about the semantics of the operation, but an approach like this would have caught this bug. Tom