RFR: 8312401: SymbolTable::do_add_if_needed hang when requesting length exceeds max_symbol_length

Jiangli Zhou jiangli at openjdk.org
Wed Jul 19 20:25:52 UTC 2023


Please review the simple fix to resolve infinite loop in SymbolTable::do_add_if_needed caused by extra long symbol string that exceeds Symbol::max_length(). See JDK-8312401 for details.

The jtreg test is converted from a test case constructed by @cushon.

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

Commit messages:
 - Add jtreg test LongExceptionMessageTest, which is converted from the test case in https://bugs.openjdk.org/browse/JDK-8312401.
 - Revert the new line change.
 - Change java_lang_String::as_symbol to return nullptr if the length of 'java_string' exceeds Symbol::max_length().
 - Change java_lang_Throwable::create_initialization_error to create a 'char *' message without using a Symbol.

Changes: https://git.openjdk.org/jdk/pull/14938/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14938&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8312401
  Stats: 52 lines in 2 files changed: 52 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/14938.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14938/head:pull/14938

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


More information about the hotspot-runtime-dev mailing list