🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #391

Bug in newld, with fix.

#391
From: Bryan Boreham
Date: Mon, 04 Sep 1989 09:53
43 lines
1825 bytes
I think the fix speaks for itself. Does nobody else out there have
more than 120 global constructors?

Bryan.


kewill% diff -c newld.c~ newld.c
*** newld.c~    Sun Jul 23 16:57:04 1989
--- newld.c     Mon Sep  4 10:44:23 1989
***************
*** 1941,1947 ****
              if (ctor_size >= ctor_size_max)
                {
                  ctor_size_max <<= 1;
!                 ctor_vec = (symbol **)xrealloc (ctor_vec, ctor_size_max);
                }
              ctor_vec[ctor_size++] = sp;
            }
--- 1941,1947 ----
              if (ctor_size >= ctor_size_max)
                {
                  ctor_size_max <<= 1;
!                 ctor_vec = (symbol **)xrealloc (ctor_vec, ctor_size_max * sizeof (symbol *));
                }
              ctor_vec[ctor_size++] = sp;
            }
***************
*** 1950,1956 ****
              if (dtor_size >= dtor_size_max)
                {
                  dtor_size_max <<= 1;
!                 dtor_vec = (symbol **)xrealloc (dtor_vec, dtor_size_max);
                }
              dtor_vec[dtor_size++] = sp;
            }
--- 1950,1956 ----
              if (dtor_size >= dtor_size_max)
                {
                  dtor_size_max <<= 1;
!                 dtor_vec = (symbol **)xrealloc (dtor_vec, dtor_size_max * sizeof (symbol *));
                }
              dtor_vec[dtor_size++] = sp;
            }
Technical Details
Message-ID: <8909040953.AA09281@edinburgh.kewill.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!kewill!bryan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!kewill!bryan
From: kewill!bryan@UUNET.UU.NET (Bryan Boreham)
Newsgroups: gnu.g++.bug
Subject: Bug in newld, with fix.
Message-ID: <8909040953.AA09281@edinburgh.kewill.uucp>
Date: 4 Sep 89 09:53:14 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 43