From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26662 invoked by alias); 8 Sep 2009 17:10:20 -0000 Received: (qmail 26494 invoked by uid 22791); 8 Sep 2009 17:10:18 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Sep 2009 17:10:11 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n88H9VVF011508; Tue, 8 Sep 2009 13:09:32 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n88H91xO028215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Sep 2009 13:09:28 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n88H91VR005048; Tue, 8 Sep 2009 19:09:01 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n88H90Xx005047; Tue, 8 Sep 2009 19:09:00 +0200 Date: Tue, 08 Sep 2009 17:10:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [patch] [ia64] Fixup breakpoints errors handling Message-ID: <20090908170900.GA3223@host0.dyn.jankratochvil.net> References: <20090905190026.GB16389@host0.dyn.jankratochvil.net> <20090905190026.GB16389@host0.dyn.jankratochvil.net> <20090907183259.GH30677@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090907183259.GH30677@adacore.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-IsSubscribed: yes 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-09/txt/msg00203.txt.bz2 On Mon, 07 Sep 2009 20:32:59 +0200, Joel Brobecker wrote: > On Sat, 05 Sep 2009 21:00:26 +0200, Jan Kratochvil wrote: > > found out the code could already for example internal_error on uninitialized > > memory after failed target_read_memory. [...] > > * ia64-tdep.c (ia64_memory_insert_breakpoint) > > (ia64_memory_remove_breakpoint): Return immediately if any of memory > > reads fail. Do not combine the VAL values. > > The patch is OK. I'm just curious as to which internal_error was > triggered? Was it the one inside that function, or did it happen > elsewhere? I have not seen any such internal_error being triggered. Still target_read_memory comment says: If an error occurs, no guarantee is made about the contents of the data at MYADDR. Therefore: val = target_read_memory (addr, bundle, BUNDLE_LEN); ... instr_breakpoint = slotN_contents (bundle, slotnum); if (instr_breakpoint == IA64_BREAKPOINT) internal_error (__FILE__, __LINE__, can induce the internal_error if either (1) target_read_memory would just put random pattern to BUNDLE while failing with the bad luck of matching IA64_BREAKPOINT. or (2) the autovariable BUNDLE would get randomly initialized to a random pattern with the bad luck of matching IA64_BREAKPOINT while failing target_read_memory would not touch the uninitialized content. I do not think it could happen in the real world. I will check it in with the other patch. Thanks, Jan