Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8307230

Fix signed overflow issues found with -ftrapv

XMLWordPrintable

      There are multiple locations in the Hotspot code (only found in C2 so far, so let's start in compiler) with signed overflows which is undefined behavior (compilers could use this undefined behavior for optimizations). We should check our code by configuring with --with-extra-cxx-flags='-ftrapv' and running some extensive testing with it. -ftrapv emits traps for signed additions, subtractions and multiplications. If there is an overflow, we abort.

      The affected version is currently set to 21 but should be updated accordingly to the found issues.

            chagedorn Christian Hagedorn
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: