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

vmError::controlled_crash should be #ifdef ASSERT and move tests to gtest

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b02

      Description

      vmError::controlled_crash and the supporting infrastructure is defined within an #ifndef PRODUCT block. But much of what it does involves stuff that is #ifdef ASSERT. And the tests that use this mechanism, such as ErrorHandler.java, all @requires vm.debug == true.

      Instead of being #ifndef PRODUCT, controlled_crash should be #ifdef ASSERT.

      Also controlled_crash() has a set of specific asserts that it tests and these asserts should be in a gtest instead. This change should fix the string output with ExecuteUnitTests to match what is in the hs_err_pid file. eg:

      # assert(how == 0) failed: test assert

      rather than just "assert failed: test assert".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coleenp Coleen Phillimore
              Reporter:
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: