From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3248 invoked by alias); 3 Jul 2005 08:23:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3230 invoked by uid 22791); 3 Jul 2005 08:23:49 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 03 Jul 2005 08:23:49 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j638Ng7l013517; Sun, 3 Jul 2005 10:23:42 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j638NguD019520; Sun, 3 Jul 2005 10:23:42 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j638Nbjq010621; Sun, 3 Jul 2005 10:23:37 +0200 (CEST) Date: Sun, 03 Jul 2005 08:23:00 -0000 Message-Id: <200507030823.j638Nbjq010621@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: qqxnjvamvxwx@spammotel.com CC: gdb-patches@sources.redhat.com, bash-maintainers@gnu.org In-reply-to: <20050702224856.037DC1D14D@cpc4-cmbg1-6-0-cust148.cmbg.cable.ntl.com> (message from Martin Simmons on Sat, 2 Jul 2005 23:48:56 +0100 (BST)) Subject: Re: Patch to prevent tilde crashing readline References: <20050702224856.037DC1D14D@cpc4-cmbg1-6-0-cust148.cmbg.cable.ntl.com> X-SW-Source: 2005-07/txt/msg00014.txt.bz2 From: Martin Simmons Date: Sat, 2 Jul 2005 23:48:56 +0100 (BST) Here is a patch to the gdb readline to fix a typo in the MinGW changes. The current CVS gdb segfaults on x86_64 FC3 Linux whenever ~ is used, e.g. source ~martin/my-commands The segfault is in strlen(), called from tilde_expand(), because tilde_expand_word() returns NULL when HAVE_GETPWNAM is not defined (i.e. always!). Someone should fix tilde_expand_word() to do the existing else clause in this case. Oops, Thanks Martin! I committed the attached patch (since it is obviously correct). Chet, I'm not sure whether you incorporated Mark Mitschell's MinGW changes yet, but you'll at least want to apply this change. Mark Index: ChangeLog.gdb from Mark Kettenis From Martin Simmons: * configure.in: Check for getpwnam instead of getpwname. * configure: Regenerate. Index: configure.in =================================================================== RCS file: /cvs/src/src/readline/configure.in,v retrieving revision 1.7 diff -u -p -r1.7 configure.in --- configure.in 9 May 2005 19:42:03 -0000 1.7 +++ configure.in 3 Jul 2005 08:18:03 -0000 @@ -120,7 +120,7 @@ AC_HEADER_DIRENT AC_CHECK_FUNCS(fcntl kill lstat memmove putenv select setenv setlocale \ strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit \ - getpwname getpwent getpwuid) + getpwnam getpwent getpwuid) AC_FUNC_STRCOLL