Skip to content

Conversation

@merykitty
Copy link
Member

@merykitty merykitty commented Nov 21, 2025

Hi,

This PR fixes various issues with TypeAryPtr and TypeAryKlassPtr. It starts with me trying to tighten the properties (flat, null_free, etc) of these classes, then fixing all the revealed issues until there are no crashes or wrong results left.

Please take a look and leave your reviews, thanks a lot.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8372113: [lworld] Fix various issues with TypeAryPtr and TypeAryKlassPtr (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1755/head:pull/1755
$ git checkout pull/1755

Update a local copy of the PR:
$ git checkout pull/1755
$ git pull https://git.openjdk.org/valhalla.git pull/1755/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1755

View PR using the GUI difftool:
$ git pr show -t 1755

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1755.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 21, 2025

👋 Welcome back qamai! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 21, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 21, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 21, 2025

Webrevs

@TobiHartmann
Copy link
Member

Thanks for working on this!

Unfortunately, it triggers a lot of failures in testing. Here's a few, I can provide more details next week.

compiler/c2/TestMergeStores.java#id0
-ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation

#  Error: assert(klass_is_exact()) failed

Current CompileTask:
C2:6719 1466    b  4       compiler.c2.TestMergeStores::test600a (165 bytes)

Stack: [0x00007f992c11b000,0x00007f992c21b000],  sp=0x00007f992c216b40,  free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xbc272a]  Compile::flatten_alias_type(TypePtr const*) const+0xeba  (type.hpp:1467)
V  [libjvm.so+0xbc2f5c]  Compile::find_alias_type(TypePtr const*, bool, ciField*, bool) [clone .part.0]+0x8c  (compile.cpp:1677)
V  [libjvm.so+0x1590623]  LibraryCallKit::inline_unsafe_access(bool, BasicType, LibraryCallKit::AccessKind, bool, bool)+0x9e3  (compile.hpp:1005)
V  [libjvm.so+0x15c211a]  LibraryIntrinsic::generate(JVMState*)+0x22a  (library_call.cpp:130)
V  [libjvm.so+0xdc5f4f]  Parse::do_call()+0xebf  (doCall.cpp:771)
V  [libjvm.so+0x190ded8]  Parse::do_one_bytecode()+0x458  (parse2.cpp:3526)
V  [libjvm.so+0x18f4f9c]  Parse::do_one_block()+0x24c  (parse1.cpp:1713)
V  [libjvm.so+0x18f63a0]  Parse::do_all_blocks()+0x130  (parse1.cpp:770)
V  [libjvm.so+0x18f9f01]  Parse::Parse(JVMState*, ciMethod*, float)+0xea1  (parse1.cpp:674)
V  [libjvm.so+0x9e1205]  ParseGenerator::generate(JVMState*)+0x135  (callGenerator.cpp:99)
V  [libjvm.so+0xbe7ee3]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x15e3  (compile.cpp:824)
V  [libjvm.so+0x9ddd30]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4c0  (c2compiler.cpp:149)
V  [libjvm.so+0xbf7f40]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x780  (compileBroker.cpp:2345)
V  [libjvm.so+0xbf97a0]  CompileBroker::compiler_thread_loop()+0x530  (compileBroker.cpp:1989)
V  [libjvm.so+0x119c49b]  JavaThread::thread_main_inner()+0x13b  (javaThread.cpp:777)
V  [libjvm.so+0x1c7c0b6]  Thread::call_run()+0xb6  (thread.cpp:242)
V  [libjvm.so+0x18a2a78]  thread_native_entry(Thread*)+0x118  (os_linux.cpp:879)
compiler/codegen/TestRedundantLea.java#StoreNParallel
-XX:UseAVX=0 -XX:UseSSE=3

Multiple IR failures
compiler/valhalla/inlinetypes/TestArrays.java
-Xcomp -XX:-TieredCompilation -DIgnoreCompilerControls=true


#  assert(_base >= KlassPtr && _base <= AryKlassPtr) failed: Not a klass pointer
#
# JRE version: Java(TM) SE Runtime Environment (26.0) (fastdebug build 26-jep401ea2-2025-11-21-1039511.tobias.hartmann.valhalla2)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-jep401ea2-2025-11-21-1039511.tobias.hartmann.valhalla2, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x15a40b7]  LibraryCallKit::inline_arraycopy()+0x1337
compiler/valhalla/inlinetypes/TestIntrinsics.java#id2
-XX:Tier0BackedgeNotifyFreqLog=0 -XX:Tier2BackedgeNotifyFreqLog=0 -XX:Tier3BackedgeNotifyFreqLog=0 -XX:Tier2BackEdgeThreshold=1 -XX:Tier3BackEdgeThreshold=1 -XX:Tier4BackEdgeThreshold=1 -XX:CompileCommand=MemLimit,*.*,0 -Xbatch

#  assert(UseArrayFlattening && is_reference_type(bt) && element_ptr->can_be_inline_type() && (!element_ptr->is_inlinetypeptr() || element_ptr->inline_klass()->maybe_flat_in_array())) failed: array can't be flat
#
# JRE version: Java(TM) SE Runtime Environment (26.0) (fastdebug build 26-jep401ea2-2025-11-21-1039511.tobias.hartmann.valhalla2)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-jep401ea2-2025-11-21-1039511.tobias.hartmann.valhalla2, mixed mode, tiered, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x18fe2ba]  Parse::array_load(BasicType)+0x14a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants