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

use C++ exceptions for out of memory situations in the compilers

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: hs25, 9, 10
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Handling out of memory errors in the compiler can be cumbersome because there are so many places to check for null return values. One possibility to make this easier would be to use C++ exceptions.

      Right now HotSpot doesn't use C++ exceptions at all. This stems from the fact that C++ compilers weren't good enough (like 15-20 years ago) to handle C++ exceptions on all platforms. This has changed.

      Since HotSpot uses it's own exception throwing mechanism to throw Java exceptions it's very likely not possible to use C++ exception everywhere. Fortunately compilers are well abstracted from the rest of the system and we could use C++ exception only in these modules.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iveresov Igor Veresov
                Reporter:
                twisti Christian Thalinger
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: