]> gcc.gnu.org Git - gcc.git/commitdiff
* libgcc2.c (__register_exceptions): Handle empty tables.
authorMike Stump <mrs@gcc.gnu.org>
Sat, 18 Mar 1995 02:31:09 +0000 (02:31 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Sat, 18 Mar 1995 02:31:09 +0000 (02:31 +0000)
From-SVN: r9200

gcc/libgcc2.c

index 6846dfc975b16adff91965371a935f84f9a539c2..bd33d1c489c60a9fa9262e392097a32315fa9b7d 100644 (file)
@@ -2237,9 +2237,14 @@ __throw_type_match (const char *catch_type, const char *throw_type)
 void
 __register_exceptions (exception_table *table)
 {
-  struct exception_table_node *node = (struct exception_table_node*)
-      malloc (sizeof (struct exception_table_node));
+  struct exception_table_node *node;
   exception_table *range = table + 1;
+
+  if (range->start == (void*)-1)
+    return;
+
+  node = (struct exception_table_node*)
+    malloc (sizeof (struct exception_table_node));
   node->table = table;
 
   /* This look can be optimized away either if the table
This page took 0.064016 seconds and 5 git commands to generate.