From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4621 invoked by alias); 2 Jul 2005 22:49:09 -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 4610 invoked by uid 22791); 2 Jul 2005 22:49:05 -0000 Received: from mta09-winn.ispmail.ntl.com (HELO mta09-winn.ispmail.ntl.com) (81.103.221.49) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 02 Jul 2005 22:49:05 +0000 Received: from aamta11-winn.ispmail.ntl.com ([81.103.221.35]) by mta09-winn.ispmail.ntl.com with ESMTP id <20050702224859.GWEV11649.mta09-winn.ispmail.ntl.com@aamta11-winn.ispmail.ntl.com> for ; Sat, 2 Jul 2005 23:48:59 +0100 Received: from cpc4-cmbg1-6-0-cust148.cmbg.cable.ntl.com ([213.104.14.148]) by aamta11-winn.ispmail.ntl.com with ESMTP id <20050702224859.OTFF11226.aamta11-winn.ispmail.ntl.com@cpc4-cmbg1-6-0-cust148.cmbg.cable.ntl.com> for ; Sat, 2 Jul 2005 23:48:59 +0100 Received: by cpc4-cmbg1-6-0-cust148.cmbg.cable.ntl.com (Postfix, from userid 597) id 037DC1D14D; Sat, 2 Jul 2005 23:48:56 +0100 (BST) From: Martin Simmons To: gdb-patches@sources.redhat.com Subject: Patch to prevent tilde crashing readline Message-Id: <20050702224856.037DC1D14D@cpc4-cmbg1-6-0-cust148.cmbg.cable.ntl.com> Date: Sat, 02 Jul 2005 22:49:00 -0000 X-SW-Source: 2005-07/txt/msg00013.txt.bz2 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. Please CC me on any replies as I am not subscribed. -- Martin Simmons Index: readline/configure =================================================================== RCS file: /cvs/src/src/readline/configure,v retrieving revision 1.10 diff -u -r1.10 configure --- readline/configure 9 May 2005 19:42:02 -0000 1.10 +++ readline/configure 29 Jun 2005 11:56:07 -0000 @@ -4139,7 +4139,7 @@ for ac_func in fcntl kill lstat memmove putenv select setenv setlocale \ strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit \ - getpwname getpwent getpwuid + getpwnam getpwent getpwuid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 Index: readline/configure.in =================================================================== RCS file: /cvs/src/src/readline/configure.in,v retrieving revision 1.7 diff -u -r1.7 configure.in --- readline/configure.in 9 May 2005 19:42:03 -0000 1.7 +++ readline/configure.in 29 Jun 2005 11:56:07 -0000 @@ -120,7 +120,7 @@ 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