Fix braino: Multiplying compiled_entries_size by a constant (or
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 30 Oct 1993 18:11:31 +0000 (18:11 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 30 Oct 1993 18:11:31 +0000 (18:11 +0000)
initializing to a constant) does not guarantee that the table is large
enough for the current batch of entries.

v7/src/microcode/cmpauxmd/c.c

index ff5fcc6665b478e3aabf1542d666e76111a2f929..022473b78507e86fb679f473f5a9b10e8ee70fce 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: c.c,v 1.8 1993/10/30 17:53:48 gjr Exp $
+$Id: c.c,v 1.9 1993/10/30 18:11:31 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -213,6 +213,9 @@ DEFUN (declare_compiled_code,
     unsigned long new_entries_size = ((compiled_entries_size == 0)
                                      ? 100
                                      : ((compiled_entries_size * 3) / 2));
+    if (new_entries_size <= n_dispatch)
+      new_entries_size = (n_dispatch + 1);
+
     new_entries = ((struct compiled_entry_s *)
                   (lrealloc (compiled_entries,
                              (new_entries_size