From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26410 invoked by alias); 7 Jul 2009 20:54:48 -0000 Received: (qmail 26396 invoked by uid 22791); 7 Jul 2009 20:54:47 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jul 2009 20:54:40 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n67KsZnn003834; Tue, 7 Jul 2009 16:54:35 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n67KsY8J014435; Tue, 7 Jul 2009 16:54:34 -0400 Received: from opsy.redhat.com (vpn-225-86.phx2.redhat.com [10.3.225.86]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n67KsXtD028917; Tue, 7 Jul 2009 16:54:34 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id EB40C37819B; Tue, 7 Jul 2009 14:54:32 -0600 (MDT) To: Paul Pluzhnikov Cc: gdb-patches@sourceware.org, archer@sourceware.org Subject: Re: [patch] fix for crash in python pretty-printer References: <20090707180121.D6ECE76BC0@localhost> <8ac60eac0907071250h4bbd5219p31e5506bd997cd21@mail.gmail.com> <8ac60eac0907071341m71bff75by3b7c958e86bbcd39@mail.gmail.com> From: Tom Tromey Reply-To: Tom Tromey Date: Tue, 07 Jul 2009 20:54:00 -0000 In-Reply-To: <8ac60eac0907071341m71bff75by3b7c958e86bbcd39@mail.gmail.com> (Paul Pluzhnikov's message of "Tue\, 7 Jul 2009 13\:41\:21 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2009-07/txt/msg00218.txt.bz2 >>>>> "Paul" == Paul Pluzhnikov writes: Paul> It turns out I didn't follow what happens when value_struct_elt() raises Paul> error correctly: when it does, res_val will be left as NULL, and that will Paul> trigger gdb_assert in my previous patch. I missed that too. Paul> Here is a fix. Sorry for the noise :-( No big deal. This is ok if you haven't committed it already. Paul> if (field) Paul> xfree (field); Jim Meyering has been going around removing these redundant 'if's. This is something I'm *sure* coccinelle can do :-) BTW, I neglected to mention upthread -- Taras has got dehydra and treehydra working for C. So, you could probably write a TRY_CATCH checker in javascript without too much trouble. Tom