From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24185 invoked by alias); 20 Oct 2006 21:32:34 -0000 Received: (qmail 24176 invoked by uid 22791); 20 Oct 2006 21:32:33 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 20 Oct 2006 21:32:30 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Gb1ye-0003vi-4I; Fri, 20 Oct 2006 17:32:28 -0400 Date: Fri, 20 Oct 2006 21:32:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org, bash-maintainers@gnu.org Subject: Re: [PATCH] Readline bug causes GDB crash on 64-bit Message-ID: <20061020213228.GA14966@nevyn.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org, bash-maintainers@gnu.org References: <200610202110.k9KLAiFL002481@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200610202110.k9KLAiFL002481@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00262.txt.bz2 On Fri, Oct 20, 2006 at 11:10:43PM +0200, Ulrich Weigand wrote: > Hello, > > GDB on s390x (64-bit) is crashing when you press ctrl-V. > This is because xmalloc is used without prototype in scope > in _rl_callback_data_alloc (readline/callback.c), and thus > the returned pointer is improperly truncated/extended. > > Fixed by including "xmalloc.h". Tested on s390x-ibm-linux. > > What's the policy for readline bugs in GDB? It is OK to check > this patch into GDB, or does it have to go upstream first? > (Where is readline upstream?) The right thing to do is to send the patch to Chet, and if he accepts it for the next readline release, commit it to our copy. I believe bash-maintainers@gnu.org (CC'd) is the right place. > ChangeLog: > > * callback.c: Include "xmalloc.h". > * Makefile.in: Add dependency. > > > Index: readline/Makefile.in > =================================================================== > RCS file: /cvs/src/src/readline/Makefile.in,v > retrieving revision 1.7 > diff -c -p -r1.7 Makefile.in > *** readline/Makefile.in 5 May 2006 18:26:12 -0000 1.7 > --- readline/Makefile.in 20 Oct 2006 20:48:49 -0000 > *************** util.o: rlprivate.h > *** 446,451 **** > --- 446,452 ---- > vi_mode.o: rlprivate.h > > bind.o: xmalloc.h > + callback.o: xmalloc.h > complete.o: xmalloc.h > display.o: xmalloc.h > funmap.o: xmalloc.h > Index: readline/callback.c > =================================================================== > RCS file: /cvs/src/src/readline/callback.c,v > retrieving revision 1.6 > diff -c -p -r1.6 callback.c > *** readline/callback.c 5 May 2006 18:26:12 -0000 1.6 > --- readline/callback.c 20 Oct 2006 20:48:49 -0000 > *************** > *** 43,48 **** > --- 43,49 ---- > #include "rldefs.h" > #include "readline.h" > #include "rlprivate.h" > + #include "xmalloc.h" > > /* Private data for callback registration functions. See comments in > rl_callback_read_char for more details. */ > -- > Dr. Ulrich Weigand > Linux on zSeries Development > Ulrich.Weigand@de.ibm.com > -- Daniel Jacobowitz CodeSourcery