PR93561 -- [bounds checking] memory overflow for spill_for

2020-02-06  <zhongyunde@huawei.com>
  	    Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/93561
	* lra-assigns.c (spill_for): Check that tested hard regno is not out of
	hard register range.
This commit is contained in:
Vladimir N. Makarov 2020-02-06 17:10:58 -05:00
parent cb273d81a4
commit d26f37a16e
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2020-02-06 <zhongyunde@huawei.com>
Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/93561
* lra-assigns.c (spill_for): Check that tested hard regno is not out of
hard register range.
2020-02-06 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64.md (aarch64_movk<mode>): Add a type

View File

@ -964,6 +964,8 @@ spill_for (int regno, bitmap spilled_pseudo_bitmap, bool first_p)
bitmap_clear (&spill_pseudos_bitmap);
for (j = hard_regno_nregs (hard_regno, mode) - 1; j >= 0; j--)
{
if (hard_regno + j >= FIRST_PSEUDO_REGISTER)
break;
if (try_hard_reg_pseudos_check[hard_regno + j] != curr_pseudo_check)
continue;
lra_assert (!bitmap_empty_p (&try_hard_reg_pseudos[hard_regno + j]));