Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
woowloop opened this issue Nov 19, 2024 · 1 comment
Open

Comments

@woowloop
Copy link

  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中加上锁后,有所改善,但仍有其他崩溃。
@bb107
Copy link
Owner

bb107 commented Nov 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants