Fix signed integer overflow in compiler code, part 1

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: 8-pool, 11-pool, 17, 21
    • Component/s: hotspot
    • b23

      Running with -ftrapv I found two cases of signed overflow that happen during startup. immI_Pow2M1 does

        is_power_of_2(n->get_int() + 1)

      and _debug_idx code does

        new_debug_idx += bump

      which can cause _debug_idx to go negative.

      Then I tried tier1 testing and hit two more problems with c1 Canonicalizer::do_Op2 and c2 AddHelper::will_overflow.

            Assignee:
            Dean Long
            Reporter:
            Dean Long
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: