-
Notifications
You must be signed in to change notification settings - Fork 30
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
TLS无法正确处理 #8
Comments
Maybe english? P.S Translated. @mdilai "The DLL compiled by VS2015 and above may crash if injected with your tool. |
@pig4210 Okay, i heard a lot of complaining about TLS issues from some random people but never catch this by myself. Probably i did a bare minimum TLS handling to get my reference DLL to work but it not complete and insufficient for your one. To be able to try fix this, you need to provide me a some example DLL that crash using Shtreeba, so i can test it. |
VS2015 及以上版本编译的 DLL ,使用你的工具注入,可能会发生崩溃。
虽然你处理了 TLS ,但仍然是无用的。
经调试发现,正常 LoadLibrary 注入的 DLL ,TlsIndex 值不为 0 。 而工具注入的 TlsIndex 值为 0 ,这其实是错误的。这导致所有的 static 变量无法被初始化。
注意: TlsIndex 只有在主模块中才可以为 0 ,其他所有 DLL 有各自不同的,非零值的 TlsIndex 。
这个问题目前看来,只能在 DLL 编译时,加入 /Zc:threadSafeInit- 解决。但这样,static 变量将非线程安全。
The text was updated successfully, but these errors were encountered: