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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 16
    • hotspot
    • None
    • b02

      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".

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

              Created:
              Updated:
              Resolved: