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

[packager] Fix Potential segfault crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: 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

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

              Dates

              Created:
              Updated:
              Resolved: