diff -Nru linux-2.5.52/arch/ia64/kernel/unwind.c~ linux-2.5.52/arch/ia64/kernel/unwind.c --- linux-2.5.52/arch/ia64/kernel/unwind.c~ Fri Jan 17 14:53:48 2003 +++ linux-2.5.52/arch/ia64/kernel/unwind.c Fri Jan 17 15:26:58 2003 @@ -1998,6 +1998,7 @@ extern char __start_gate_section[], __stop_gate_section[]; unsigned long *lp, start, end, segbase = unw.kernel_table.segment_base; const struct unw_table_entry *entry, *first; + extern int ia64_unw_end; size_t info_size, size; char *info; @@ -2006,7 +2007,10 @@ size = 0; first = lookup(&unw.kernel_table, start); - for (entry = first; entry->start_offset < end; ++entry) + for (entry = first; + (entry < (struct unw_table_entry *) &ia64_unw_end) && + (entry->start_offset < end); + ++entry) size += 3*8 + 8 + 8*UNW_LENGTH(*(u64 *) (segbase + entry->info_offset)); size += 8; /* reserve space for "end of table" marker */ @@ -2021,7 +2025,10 @@ lp = unw.gate_table; info = (char *) unw.gate_table + size; - for (entry = first; entry->start_offset < end; ++entry, lp += 3) { + for (entry = first; + (entry < (struct unw_table_entry *) &ia64_unw_end) && + (entry->start_offset < end); + ++entry, lp += 3) { info_size = 8 + 8*UNW_LENGTH(*(u64 *) (segbase + entry->info_offset)); info -= info_size; memcpy(info, (char *) segbase + entry->info_offset, info_size);