Skip to content

Potential deadlock in debug build #31

@kdbghelp

Description

@kdbghelp

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.

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