2016-12-18 20:38 GMT+03:00 Peter Dimov
Antony Polukhin wrote:
The bad thing is that any printf like function, kernel calls (including multithreading) or malloc are not async signal handler safe. I'm quite sure that COM functions allocate memory and do some synchronization.
We can't speak of "COM functions" as such. Every COM function does its own thing. In the in-process case, COM is basically just an ABI. What Dbgeng.dll does is what it does. It certainly doesn't allocate using (the program's) malloc though. And if it does synchronize, it does it with its own CRITICAL_SECTIONs, and those can be used in a structured exception handler.
Those are very generous assumptions. As long as we have no strict documentation or source codes of the component - it is UB to use it in async-signal-handler. -- Best regards, Antony Polukhin