From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25868 invoked by alias); 5 Oct 2012 22:05:38 -0000 Received: (qmail 25857 invoked by uid 22791); 5 Oct 2012 22:05:37 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from elasmtp-dupuy.atl.sa.earthlink.net (HELO elasmtp-dupuy.atl.sa.earthlink.net) (209.86.89.62) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Oct 2012 22:05:32 +0000 Received: from [68.96.200.16] (helo=macbook2.local) by elasmtp-dupuy.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1TKG1U-0000MQ-Ca for gdb-patches@sourceware.org; Fri, 05 Oct 2012 18:05:32 -0400 Message-ID: <506F599E.5080903@earthlink.net> Date: Fri, 05 Oct 2012 22:05:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: "maint print arch" causing gdb crash References: <506EEAEC.2010604@codesourcery.com> In-Reply-To: <506EEAEC.2010604@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da940e0a9d398b1d28925473e7ba05bec6110350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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: 2012-10/txt/msg00104.txt.bz2 On 10/5/12 7:13 AM, ali_anwar wrote: > Hi, > > 'gdbarch_dump' is in some cases passing a NULL pointer to 'sprintf' > when printing 'gdbarch->stap_gdb_register_suffix' etc. Printing NULL > pointers like this is undefined behavior. With glibc passing a NULL > pointer just prints "(null)". With the MSVC libc, however, GDB crashes. > > Attached patch fixes this issue using the similar approach discussed > in following scenario: > http://sourceware.org/ml/gdb-patches/2011-10/msg00662.html > > There are some newly added variables due to which "maint print arch" > command was causing gdb crash on whindows host. This patch takes care > of them. > > OK? Yes please, this is good! Stan stan@codesourcery.com