RFR: 8272131: PhaseMacroExpand::generate_slow_arraycopy crash when clone null CallProjections.fallthrough_ioproj [v2]

Hui Shi hshi at openjdk.java.net
Tue Aug 10 13:31:00 UTC 2021


> This fix a crash in PhaseMacroExpand::generate_slow_arraycopy in following case, because arraycopy node's fallthrough_ioproj is NULL.
> - arraycopy has ArrayIndexOutOfBoundsException exception
> - arraycopy is before an infinite loop
> 
> Fix is not cloning and replacing fallthrough_ioproj when it is NULL.
> 
> 
>     static void foo() {
>         try {
>             Arrays.copyOfRange(src, -1, 128);
>             do {
>             } while (true);
>         } catch (ArrayIndexOutOfBoundsException ex) {
>             count++;
>         }
>     }
> 
> 
> New test is added.
> Test: Linux X64 tier1/tier2/tier3 release/fastdebug passed.

Hui Shi has updated the pull request incrementally with one additional commit since the last revision:

  Fix typo and comment

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5054/files
  - new: https://git.openjdk.java.net/jdk/pull/5054/files/1c9ce965..fc09a7ab

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5054&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5054&range=00-01

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5054.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5054/head:pull/5054

PR: https://git.openjdk.java.net/jdk/pull/5054


More information about the hotspot-compiler-dev mailing list