Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8318525

Atomic gtest should run as TEST_VM to access VM capabilities

    XMLWordPrintable

Details

    • b21

    Backports

      Description

        While doing JDK-8316961, I noticed that atomic tests behave weirdly when executed from gtest. I believe the reason is that tests are running as TEST, not as TEST_VM. So the VM is not initialized, which fails the tests on asserts and/or takes weird paths in the atomic code.

        Some Atomic implementations reach to VM_Version for asserts:
        https://github.com/openjdk/jdk/blob/9cf334fb6488188ea4236e5d156b11245bace88f/src/hotspot/os_cpu/linux_arm/atomic_linux_arm.hpp#L149

        Some Atomic implementations reach to StubRoutines for fallbacks:
        https://github.com/openjdk/jdk/blob/9cf334fb6488188ea4236e5d156b11245bace88f/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp#L520

        Attachments

          Issue Links

            Activity

              People

                shade Aleksey Shipilev
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: