OSDN Git Service

* cplus-dem.c (gnu_special): Don't get confused by .<digits>
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Feb 1998 16:53:40 +0000 (16:53 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Feb 1998 16:53:40 +0000 (16:53 +0000)
strings that are not actually lengths.
* config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
since it gets built automatically
* vasprintf.c (int_vasprintf): Increase buffer size for float/double
values.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18171 138bc75d-0d04-0410-961f-82ee72b054a4

libiberty/ChangeLog
libiberty/config/mh-aix
libiberty/config/mh-cygwin32
libiberty/cplus-dem.c
libiberty/vasprintf.c

index 43fe6dd..1e529f8 100644 (file)
@@ -3,6 +3,16 @@ Thu Feb 12 16:29:49 1998  Ian Lance Taylor  <ian@cygnus.com>
        * getopt.c: Update to latest FSF version.
        * getopt1.c: Likewise.
 
+Tue Feb 10 16:58:33 1998  Stan Shebs  <shebs@andros.cygnus.com>
+
+       * cplus-dem.c (gnu_special): Don't get confused by .<digits>
+       strings that are not actually lengths.
+
+Thu Feb  5 18:48:56 1998  Geoffrey Noer  <noer@cygnus.com>
+
+        * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
+        since it gets built automatically
+
 Fri Feb  6 01:35:17 1998  Manfred Hollstein  <manfred@s-direktnet.de>
 
        * Makefile.in (FLAGS_TO_PASS): Don't pass PICFLAG.
@@ -14,6 +24,11 @@ Sun Feb  1 02:52:32 1998  Mike Stump  <mrs@wrs.com>
        * config.table (vxworks configs): Default to VxWorks 5.x, as that is
        the currently shipping OS.
 
+Sun Jan 18 15:57:28 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
+
+       * vasprintf.c (int_vasprintf): Increase buffer size for float/double
+       values.
+
 Sat Jan 17 22:32:38 1998  Mumit Khan  <khan@xraylith.wisc.edu>
                           J.J. VanderHeijden <J.J.vanderHeijden@student.utwente.nl>
 
@@ -39,7 +54,7 @@ Thu Dec  4 17:25:19 1997  Jeffrey A Law  (law@cygnus.com)
 Wed Nov 19 13:37:06 1997  Michael Meissner  <meissner@cygnus.com>
 
        * alloca-norm.h (alloca, GCC case): Don't redefine alloca if it
-       was alr eady defined previously.
+       was already defined previously.
 
 Mon Nov 10 12:48:03 1997  Philippe De Muyter  <phdm@macqel.be>
 
@@ -87,13 +102,6 @@ Sun Sep 28 12:00:52 1997  Mark Mitchell  <mmitchell@usa.net>
         (consume_count_with_underscores): New function.
         (demangle_signature): Handle new name-mangling scheme.
 
-Sun Sep 28 12:00:52 1997  Mark Mitchell  <mmitchell@usa.net>
-
-        * cplus-dem.c (demangle_template): Add new parameter.  Handle new
-        template-function mangling.
-        (consume_count_with_underscores): New function.
-        (demangle_signature): Handle new name-mangling scheme.
-
 Wed Sep 24 00:31:59 1997  Felix Lee  <flee@yin.cygnus.com>
 
        * asprintf.c: stdarg.h when ALMOST_STDC
index c7b848d..ee84d03 100644 (file)
@@ -1,3 +1,4 @@
+# This file is only needed by AIX 3.1.
 HDEFINES = -D__IEEE_BIG_ENDIAN
 RANLIB=true
 INSTALL=cp
index f45bdc8..42b1afb 100644 (file)
@@ -1,2 +1,2 @@
 HDEFINES=-DNEED_sys_siglist -DNEED_basename -DNEED_strsignal
-EXTRA_OFILES=vasprintf.o random.o
+EXTRA_OFILES=random.o
index ed16c86..f4d7123 100644 (file)
@@ -1692,6 +1692,15 @@ gnu_special (work, mangled, declp)
              if (isdigit(*mangled[0]))
                {
                  n = consume_count(mangled);
+                 /* We may be seeing a too-large size, or else a
+                    ".<digits>" indicating a static local symbol.  In
+                    any case, declare victory and move on; *don't* try
+                    to use n to allocate.  */
+                 if (n >= strlen (*mangled))
+                   {
+                     success = 1;
+                     break;
+                   }
                }
              else
                {
index 38e8468..da83db2 100644 (file)
@@ -74,7 +74,7 @@ int_vasprintf (result, format, args)
            }
          while (strchr ("hlL", *p))
            ++p;
-         /* Should be big enough for any format specifier except %s.  */
+         /* Should be big enough for any format specifier except %s and floats.  */
          total_width += 30;
          switch (*p)
            {
@@ -93,6 +93,9 @@ int_vasprintf (result, format, args)
            case 'g':
            case 'G':
              (void) va_arg (ap, double);
+             /* Since an ieee double can have an exponent of 307, we'll
+                make the buffer wide enough to cover the gross case. */
+             total_width += 307;
              break;
            case 's':
              total_width += strlen (va_arg (ap, char *));