RFR: 8312401: SymbolTable::do_add_if_needed hang when requesting length exceeds max_symbol_length [v2]

Jiangli Zhou jiangli at openjdk.org
Sat Jul 22 00:39:19 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.

Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:

  Update according to David Holmes' comments.
  - In java_lang_String::as_symbol and java_lang_String::as_symbol_or_null, check input string length and truncate to max symbol length if exceeding.
  - Change java_lang_Throwable::create_initialization_error to avoid using Symbol for message.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14938/files
  - new: https://git.openjdk.org/jdk/pull/14938/files/b12eea84..19a7d3d4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14938&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14938&range=00-01

  Stats: 22 lines in 3 files changed: 18 ins; 2 del; 2 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