[chromium-dev] Re: browser_tests hang on Win7

2009-09-29 Thread Jeremy Orlow
Yeah, the loader lock is held the entire time while in the DLL main. The lock allows re-entrance, but if you do anything that starts another thread and then tries to dynamically load a DLL you'll get a deadlock. Unfortunately, it's very hard to predict what will cause a dynamic load (or one of

[chromium-dev] Re: browser_tests hang on Win7

2009-09-29 Thread Jay Campan
That OleInitialize/Uninitialize business is there to prevent unbalanced Ole init calls in some cases. I did not realize DllMain was called with the loader lock held. Looks like it could cause deadlocks. I'll make move that code to a separate function invoked before the DLL is unloaded . Jay On

[chromium-dev] Re: browser_tests hang on Win7

2009-09-29 Thread Darin Fisher
Ah, that sounds great. Thanks!-Darin On Mon, Sep 28, 2009 at 11:30 PM, Jay Campan jcam...@chromium.org wrote: That OleInitialize/Uninitialize business is there to prevent unbalanced Ole init calls in some cases. I did not realize DllMain was called with the loader lock held. Looks like it

[chromium-dev] Re: browser_tests hang on Win7

2009-09-28 Thread Andrew Scherkus
I've read somewhere before that you should do as little as possible inside DllMain. Something like this comes to mind: http://blogs.msdn.com/oldnewthing/archive/2007/09/04/4731478.aspx Is it worth trying to defer calling OleInitialize?