RFR: 8339316: Test runtime/exceptionMsgs/NoClassDefFoundError/NoClassDefFoundErrorTest.java fails after JDK-8338257

David Holmes dholmes at openjdk.org
Mon Sep 2 00:45:32 UTC 2024


In JDK-8338257 I overlooked updating the callers of `UTF8::is_legal_utf8` to pass a `size_t` length parameter. In some cases the length was explicitly cast to `int` and in the test case in question (with `-Xcheck:jni`) this caused integer overflow to a negative value which then became an exceedingly large `size_t` value and we then tried to do utf8 validation on random bytes.

Testing:
- failing test
- tiers 1-4

Thanks

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

Commit messages:
 - 8339316: Test runtime/exceptionMsgs/NoClassDefFoundError/NoClassDefFoundErrorTest.java fails after JDK-8338257

Changes: https://git.openjdk.org/jdk/pull/20804/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20804&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8339316
  Stats: 11 lines in 7 files changed: 1 ins; 4 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/20804.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20804/head:pull/20804

PR: https://git.openjdk.org/jdk/pull/20804


More information about the hotspot-dev mailing list