http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55158



--- Comment #2 from Gary Funck <gary at intrepid dot com> 2012-11-01 00:35:41 
UTC ---

I tried making the change suggested in the previous comment and ran into a

segfault here:



5876        dump_new_block_header (0, *target_bb, head, tail);

5877

5878      if (init_state == NULL)

5879        state_reset (curr_state);

5880      else

5881        memcpy (curr_state, init_state, dfa_state_size);

5882

5883      /* Clear the ready list.  */

5884      ready.first = ready.veclen - 1;

5885      ready.n_ready = 0;



(gdb) p init_state

$10 = (state_t) 0x431



init_state is an invalid pointer.



Going up one level.



2985          curr_bb = first_bb;

2986          if (dbg_cnt (sched_block))

2987            {

2988              edge f;

2989

2990              schedule_block (&curr_bb, bb_state[first_bb->index]);

2991              gcc_assert (EBB_FIRST_BB (bb) == first_bb);

2992              sched_rgn_n_insns += sched_n_insns;

2993              f = find_fallthru_edge (last_bb->succs);

2994              if (f && f->probability * 100 / REG_BR_PROB_BASE >=



(gdb) p first_bb->index

$13 = 25



If the last basic block is 23, then this index is out-of-range.

Reply via email to