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

Native implementation of sunmscapi should use operator new (nothrow) for allocations

XMLWordPrintable

    • b142
    • windows

        Currently, the form of ::operator new() is used, which throws std::bad_alloc upon failure.
        Since we don't have handling of c++ exceptions in the code, such failures wouldn't be handled.

        Instead, ::operator new(std::nothrow) can be used, which would return 0 in a case of a failure.
        Then we can (try to) throw Java exception of type OutOfMemoryError.

              igerasim Ivan Gerasimov
              igerasim Ivan Gerasimov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: