GNU TROFF LEAK - G++ BUG
authorJames Clark <jjc@jclark.com>
Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)
committerJames Clark <jjc@jclark.com>
Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)
I would guess that the problem is that your copy of groff was
compiled with g++ 1.39.  This version of g++ has a bug that causes a
serious leak in GNU troff.

AUTHOR: James Clark (jjc@jclark.com)
386BSD-Patchkit: patch00056

usr/src/usr.bin/g++/cc1plus/cplus-decl.c

index f77ac7c..0ef05e7 100644 (file)
@@ -25,6 +25,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 /* ??? not all decl nodes are given the most useful possible
    line numbers.  For example, the CONST_DECLs for enum values.  */
 
 /* ??? not all decl nodes are given the most useful possible
    line numbers.  For example, the CONST_DECLs for enum values.  */
+/*
+ *
+ * PATCHES MAGIC                LEVEL   PATCH THAT GOT US HERE
+ * --------------------         -----   ----------------------
+ * CURRENT PATCH LEVEL:         1       00056
+ * --------------------         -----   ----------------------
+ *
+ * 27 Nov 1992 James Clark             Fixed memory bug in g++
+ */
 
 #include "config.h"
 #include "tree.h"
 
 #include "config.h"
 #include "tree.h"
@@ -7953,7 +7962,7 @@ finish_function (lineno, call_poplevel)
       if (TREE_GETS_DELETE (current_class_type))
        exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
                                      get_identifier (OPERATOR_DELETE_FORMAT),
       if (TREE_GETS_DELETE (current_class_type))
        exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
                                      get_identifier (OPERATOR_DELETE_FORMAT),
-                                     build_tree_list (NULL_TREE, integer_zero_node),
+                                    build_tree_list (NULL_TREE, current_class_decl),
                                      NULL_TREE, LOOKUP_NORMAL);
       else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
        exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
                                      NULL_TREE, LOOKUP_NORMAL);
       else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
        exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);