[GHC] #3711: Bad error reporting when calling a function in a module which depends on a DLL on Windows

GHC ghc-devs at haskell.org
Mon Apr 4 11:40:27 UTC 2016


#3711: Bad error reporting when calling a function in a module which depends on a
DLL on Windows
-------------------------------------+-------------------------------------
        Reporter:  fasta             |                Owner:
            Type:  bug               |               Status:  new
        Priority:  lowest            |            Milestone:
       Component:  Runtime System    |              Version:  6.10.4
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by Phyx-):

 * cc: simonmar (added)


Comment:

 At the very least we do call `GetLastError()` now.

 {{{
 sysErrorBelch("addDLL: %" PATH_FMT " (Win32 error %lu)", dll_name,
 GetLastError());
 }}}

 Also I don't think we can get more information aside from filling in the
 format specifiers in the error we get back from Windows.

 Aside from that, such errors are quite easy to debug from the outside.
 Just enable [https://msdn.microsoft.com/en-
 us/library/windows/hardware/ff556886(v=vs.85).aspx loader snaps] and
 attach a debugger (e.g. gdb or windbg) and you'll see why the load failed.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/3711#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list