GHC 6.4.1 and Win32 DLLs: Bug in shutdownHaskell?

Michael Marte marte at pms.informatik.uni-muenchen.de
Tue Oct 24 04:59:56 EDT 2006


I am still using ghc 6.4.2 for creating my DLL and, as long as the DLL 
does not open a file, releasing the DLL works fine. I have not yet tried 
ghc 6.5.

Michael

SevenThunders wrote:
> 
> Michael Marte wrote:
> 
>>Hello *,
>>
>>before filing a bug report, I want others to comment on my problem. 
>>Maybe it's my fault, not ghc's.
>>
>>I wrapped up some Haskell modules in a Win32 DLL.
>>Loading the DLL dynamically (with LoadLibrary) works fine. However, 
>>whether I actually use the library or not, the program (an application 
>>with MFC GUI) crashes upon termination.
>>
>>
> 
> 
> I was wondering if there has been any recent progress on this issue.
> I have a binary windows distribution of GHC 6.5. from May  02 2006.
> 
> I created a Haskell DLL that is called from a C stub, which ultimately gets
> called from Matlab.
> I'm not sure if Matlab loads and unloads the DLL everytime it's called, but
> it definately crashes Matlab if one tries to unload the DLL from inside
> Matlab (using Matlab's clear command).  The crash occurs even if no Haskell
> code is actually called from Matlab.  It suffices to simply load the Haskell
> DLL and then unload it.
> 
> If you do call the DLL it will work for the first few times and then
> eventually crash.  Presumably there is some kind of memory leak as alluded
> to elsewhere in this thread.  I'm looking for usable workarounds here.



More information about the Glasgow-haskell-users mailing list