OSDN Git Service

* libgcc2.c (__register_exceptions): Handle empty tables.
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Mar 1995 02:31:09 +0000 (02:31 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Mar 1995 02:31:09 +0000 (02:31 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9200 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/libgcc2.c

index 6846dfc..bd33d1c 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