GTest opto.canonicalize_constraints cannot run without VM

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 27
    • Component/s: hotspot

      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.

            Assignee:
            Axel Boldt-Christmas
            Reporter:
            Axel Boldt-Christmas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: