JDK-8374450 : GTest opto.canonicalize_constraints cannot run without VM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 27
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2026-01-02
  • Updated: 2026-01-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 27
27Unresolved
Related Reports
Causes :  
Description
JDK-8367341 changed the `opto.canonicalize_constraints` gtest to not be a VM test. However the test explicitly uses symbols which are setup in `Type::Initialize_shared` (which seems to happen as a side effect of generating stubs at VM start. Also see comment in `Type::Initialize_shared`).

Running `make test TEST="gtest:opto.canonicalize_constraints"` crashes with a segmentation fault.

If the change from VM was necessary in JDK-8367341, then I can not find any comment about it in the RFE or in the PR.

Some proposed solutions here:
 * If it is necessary to not run `test_canonicalize_constraints_trivial()` in VM because of some race, create a call once style test fixture which calls `Type::Initialize_shared` (or extract the relevant initialization for the constants into something which can be called from both the VM and the GTest).
 * If only the other parts of `opto.canonicalize_constraints` (everything but `test_canonicalize_constraints_trivial()`) requires a non-VM test, move `test_canonicalize_constraints_trivial()` to its own VM test.
 * If neither of the two above necessary just revert back to a VM test. 

I did some stress test with reverting the VM test and shuffling the test order. I cannot find any dependencies here, nor by a cursory code inspection.
Comments
[~aboldtch] are you planning to work on a fix or should we re-assign to [~qamai]? ILW = GTest fails due to VM dependency, single GTest without VM, no workaround = MLH = P4
05-01-2026