Skip to content

win32: Initialize mutexes

Erik Faye-Lund requested to merge initialize-mutexes into msclc-d3d12

While working on !206 (merged), I realized how great the AppVerifier on Windows is, but it also tells us about some warnings that aren't great regarding using uninitialized mutexes.

While it currently works, it seems dangerous to make assumptions about what an initialized CRITICAL_SECTION looks like, so seems like we should move away from trying to emulate _MTX_INITIALIZER_NP instead.

So here's some patches for this. It's not complete, but complete enough for me to compile things here. There might be more cases that needs fixing before this can land, though. One alternative could be to drop the last patch, so we get rid of the cases that are known to occur.

But with this and !206 (merged), I get clean AppVerifier runs of the testcase in !206 (merged), so that's nice ;)

Merge request reports