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

Potential deadlock in debug build #31

Open
kdbghelp opened this issue Feb 15, 2019 · 0 comments
Open

Potential deadlock in debug build #31

kdbghelp opened this issue Feb 15, 2019 · 0 comments

Comments

@kdbghelp
Copy link

When build mhook in debug mode, in function SuspendOneThread:
ODPRINTF((L"mhooks: SuspendOneThread: Successfully suspended thread %d - IP is at %p", dwThreadId, pIp)); break;
and in ODPRINTF will call _vscwprintf, in _vscwprintf it potential call _free_dbg, this will acquire the VCRuntime lock. At the meantime, if the suspended thread is doing some malloc or free and hold the runtime lock, the program will hang.

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

1 participant