Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 24428

re: What does INIT_ONCE_CTX_RESERVED_BITS mean?

$
0
0

Static instance of class in C++. Problem solved.

["Hey, let's do complicated stuff in DLL_PROCESS_ATTACH. What could possibly go wrong?" -Raymond]

In case you might doubt what Raymond is saying here, I just spent months trying to get a third-party component supplier to fix an intermittent hang that happened only on the machines at one customer site.  It happened because a static initializer called a function that led through a chain of 5 dlls and 20 calls, including several system calls, and then it caused the load of another dll, and bang, deadlock, because the loader lock is already held.  This was NOT FUN.


Viewing all articles
Browse latest Browse all 24428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>