#3605: Dll's freeze with -threaded
-----------------------------+----------------------------------------------
Reporter:  NeilMitchell      |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.12.1 RC1        |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 Attached are two source files (one .c, one .hs), which are compiled (using
 mk.sh) into DsoHsDemo.dll. When this library is loaded, using the
 following C snippet:

 {{{
 int main(int argc, char* argv[])
 {
     printf("Started LoadLibrary\n");
     LoadLibrary("DsoHsDemo.dll");
     printf("Finished LoadLibrary\n");
 }
 }}}

 The program freezes:

 {{{
 $ ./mk.sh && ./CSnippet
 The Glorious Glasgow Haskell Compilation System, version 6.12.0.20091010
 Creating library file: DsoHsDemo.dll.a
 Started LoadLibrary
 pre hs_init
 <program freezes>
 }}}

 The freeze only occurs when the dll is linked with -threaded, and happens
 within either startupHaskell, or (if you call hs_init/hs_add_root instead)
 within hs_add_root. This happens with GHC 6.10.4 and 6.12rc1 on Windows
 XP.

 This bug appears to make it impossible to successfully build a DLL for
 multithreaded use.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3605>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to