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

VMError::controlled_crash intentionally invokes undefined behavior

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 11
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      There are multiple places where VMError::controlled_crash (in utilities/vmError.cpp) intentionally invokes undefined behavior, in an attempt to provoke a crash that can be examined by a surrounding test driver. However, the compiler is free to generate pretty much anything at all for such manifest invocations of undefined behavior. Indeed, some of the test cases have comments suggesting that no crash might occur.

      This function should be reworked to do something reliable, e.g. using raise() to generate the desired signal, and similar things. As it is, some of the tests it performs are pretty questionable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kbarrett Kim Barrett
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: