Skip to content

MmpTls存在内存泄漏,大量线程同时加载dll存在冲突 #58

Open

Description

@woowloop
  1. MmpTls在线程开始时分配内存,线程结束时并未释放。
  2. LPVOID buffer = ReadDllFile(R"(Test.dll)");
    HMODULE hModule = nullptr;
    auto status = LdrLoadDllMemoryExW(&hModule, nullptr, 0, buffer, 0, L"", nullptr);
    LdrUnloadDllMemory(hModule);
    如以上测试代码,多个线程同时执行就会出错,在LdrLoadDllMemoryEx和LdrUnloadDllMemory中加上锁后,有所改善,但仍有其他崩溃。

Activity

  1. bb107 commented on Nov 19, 2024

    @bb107
    Owner

    你好,感谢反馈。在实现功能时确实没有考虑多线程安全。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions