2005-11-17 Frédéric Riss * dwarf2-frame.c: (execute_cfa_program): Don't access past the allocated dwarf2_frame_state.initial.regs. Index: dwarf2-frame.c =================================================================== --- dwarf2-frame.c (revision 98) +++ dwarf2-frame.c (working copy) @@ -294,7 +294,13 @@ gdb_assert (fs->initial.reg); reg = insn & 0x3f; dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1); - fs->regs.reg[reg] = fs->initial.reg[reg]; + if (reg < fs->initial.num_regs) + fs->regs.reg[reg] = fs->initial.reg[reg]; + else + /* We certainly shouldn't get here. If we do, then the compiler + generated frame information asking for the restoration + of something that wasn't initialized. */ + fs->regs.reg[reg].how = DWARF2_FRAME_REG_UNSPECIFIED; } else {