Commit a12cf650 by Jeffrey A Law Committed by Jeff Law

final.c (final): Detect out of bounds array access to the insn_lengths array.

        * final.c (final): Detect out of bounds array access to
        the insn_lengths array.

From-SVN: r34901
parent 3abaac67
Fri Jul 7 07:47:35 2000 Jeffrey A Law (law@cygnus.com)
* final.c (final): Detect out of bounds array access to
the insn_lengths array.
2000-07-07 Kazu Hirata <kazu@hxi.com>
* fold-const.c (fold): Fix a comment typo.
......
......@@ -2014,6 +2014,12 @@ final (first, file, optimize, prescan)
for (insn = NEXT_INSN (first); insn;)
{
#ifdef HAVE_ATTR_length
#ifdef ENABLE_CHECKING
/* This can be triggered by bugs elsewhere in the compiler if
new insns are created after init_insn_lengths is called. */
if (INSN_UID (insn) >= insn_lengths_max_uid)
abort ();
#endif
insn_current_address = insn_addresses[INSN_UID (insn)];
#endif
insn = final_scan_insn (insn, file, optimize, prescan, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment