From: Mike Stump Date: Sat, 18 Mar 1995 02:31:09 +0000 (+0000) Subject: * libgcc2.c (__register_exceptions): Handle empty tables. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47c0d9de92723e805c6167ff53e850dfe3354e9f;p=platform%2Fupstream%2Fgcc.git * libgcc2.c (__register_exceptions): Handle empty tables. From-SVN: r9200 --- diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 6846dfc..bd33d1c 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -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