RFR: 8261450: JShell crashes with SIOOBE in tab completion

Jan Lahoda jlahoda at openjdk.java.net
Wed Mar 3 16:47:54 UTC 2021


`reflowTillNow` will strip trailing spaces, but then `reflownTo` may point after the full content of `result`. Need to fix `reflownTo` to not point after the full content of `result`, otherwise a `StringIndexOutOfBoundsException` may occur.

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

Commit messages:
 - 8261450: JShell crashes with SIOOBE in tab completion

Changes: https://git.openjdk.java.net/jdk/pull/2812/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2812&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261450
  Stats: 16 lines in 2 files changed: 13 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2812.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2812/head:pull/2812

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


More information about the compiler-dev mailing list