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

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

    XMLWordPrintable

    Details

    • Resolved In Build:
      b142
    • OS:
      windows

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: