🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Bryan Boreham Wed, 19 Jul 1989 17:02
gdb 3.2 core-dumping fix.
#202
Author: Bryan Boreham
Date: Wed, 19 Jul 1989 17:02
36 lines
1682 bytes
I think this is a valid fix for gdb:

*** dbxread.c~  Tue Jul 11 03:38:46 1989
--- dbxread.c   Wed Jul 19 16:16:42 1989
***************
*** 4254,4259 ****
--- 4254,4263 ----
       The `?' is a placeholder for one of '+' (public visibility),
       '0' (protected visibility), and '-' (private visibility).  */

+ /* Change by Bryan Boreham, Kewill, Wed Jul 19 15:02:04 1989.
+    We better set p right now, in case there are no fields at all...    */
+   p = *pp;
+
    while (**pp != ';')
      {
        int visibility;


I'm sorry, but I don't have a example small enough to post that
demonstrates the core-dump.

The problem occurred whilst using C++ 1.35.1-. Basically, if there are
no data fields in a struct, then in function read_struct_type, **pp
will be ';' the first time we get to line 4257, so the loop will be
skipped, leading to line 4344, that reads "if (p[1] == ':')", and p
has not been initialised.

My fix cures the core-dump, but I don't know enough about gdb or dbx
format to tell if it will break something else.

Bryan Boreham			bryan@kewill.uucp  
Software Engineer	||	bryan%kewill@uunet.uu.net
Kewill Systems PLC	||  ... uunet!mcvax!ukc!root44!kewill!bryan
Walton-On-Thames	
Surrey, England		Telephone: (+44) 932 248 328
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads