🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #187

GDB 3.2 Core dump due to readline.c

#187
From: Andrew Thomas
Date: Thu, 13 Jul 1989 18:17
31 lines
1456 bytes
There is a bug in GDB 3.2 such that if your ~/.inputrc file contains
an unrecognized command string, then GDB will core dump before it
gives you the first prompt due to referencing through a NULL pointer.
This bug has also been pointed out in bash 1.02 and the following
patch is sanctioned by the writer of bash.  It can be applied to
readline.c for gdb and bash both:

*** readline.c.orig	Thu Jul 13 14:11:18 1989
--- readline.c	Thu Jul 13 14:06:24 1989
***************
*** 3794,3800 ****
  {
    register int i;
  
!   for (i = 0; funmap[i]->name; i++)
      if (stricmp (funmap[i]->name, string) == 0)
        return (funmap[i]->function);
    return ((Function *)NULL);
--- 3794,3800 ----
  {
    register int i;
  
!   for (i = 0; funmap[i]; i++)
      if (stricmp (funmap[i]->name, string) == 0)
        return (funmap[i]->function);
    return ((Function *)NULL);
--

Andrew Thomas
andrewt@watsnew.waterloo.edu	Systems Design Eng.	University of Waterloo
"If a million people do a stupid thing, it's still a stupid thing." - Opus
Technical Details
Message-ID: <ANDREWT.89Jul13141728@watsnew.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!watcgl!andrewt

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!watcgl!andrewt
From: andrewt@watsnew.waterloo.edu (Andrew Thomas)
Newsgroups: gnu.gdb.bug
Subject: GDB 3.2 Core dump due to readline.c
Message-ID: <ANDREWT.89Jul13141728@watsnew.waterloo.edu>
Date: 13 Jul 89 18:17:28 GMT
Sender: daemon@watcgl.waterloo.edu
Distribution: world
Organization: University of Waterloo, Waterloo, Ontario, Canada
Lines: 31