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

The win32 awt DllMain crashed during vm exit.

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2.2
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      The win32 awt DllMain has the following code. Because this code may be called at global destruction time, it is very unsafe to call back to vm at this time. The vm expect the dll does clean up at JNI_Unload(). At the global destruction time, the time may have been fully cleanup. So add if statement like
        if (reason == DLL_PROCESS_ATTACH) {
          ...
        }
      So the code only take effect on global construction.

      extern "C" BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call,
                                       LPVOID)
      {
          TRY;

          AwtToolkit::GetInstance().SetModuleHandle(hModule);
          return TRUE;

          CATCH_BAD_ALLOC_RET(FALSE);
      }

        Attachments

          Activity

            People

            • Assignee:
              dmendenhsunw David Mendenhall (Inactive)
              Reporter:
              hongzh Hong Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: