Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Patch to prevent tilde crashing readline
@ 2005-07-02 22:49 Martin Simmons
  2005-07-03  8:23 ` Mark Kettenis
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Simmons @ 2005-07-02 22:49 UTC (permalink / raw)
  To: gdb-patches

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
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-03  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-02 22:49 Patch to prevent tilde crashing readline Martin Simmons
2005-07-03  8:23 ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox