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

[packager] Fix Potential segfault crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • P3
    • None
    • None
    • deploy

    Description

      modules/fxpackager/src/main/native/library/common/Package.cpp: assert(FBootFields != NULL);

      can cause a segfault or null point exception. This should be fixed to handle the error case better.

      Package.cpp:

      void Package::FreeBootFields() {
          if (FBootFields != NULL) {
              delete FBootFields;
              FBootFields = NULL;
          }
      }

      JavaVirtualMachine.cpp:

          // On Mac we can only free the boot fields if the calling thread is not the main thread.
          #ifdef MAC
          if (platform.IsMainThread() == false) {
              package.FreeBootFields();
          }
          #else
          package.FreeBootFields();
          #endif //MAC

      Attachments

        Activity

          People

            asemenyuk Alexey Semenyuk
            cbensen Chris Bensen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: