[GHC] #12060: GHC panic depending on what a Haskell module is named
GHC
ghc-devs at haskell.org
Sat May 14 11:27:48 UTC 2016
#12060: GHC panic depending on what a Haskell module is named
----------------------------------+--------------------------------------
Reporter: Darwin226 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 7.10.3
Resolution: | Keywords:
Operating System: Windows | Architecture: x86_64 (amd64)
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
----------------------------------+--------------------------------------
Description changed by Darwin226:
@@ -28,0 +28,3 @@
+
+ Here's a link to the file (3MB)
+ https://dl.dropboxusercontent.com/u/35032740/ShareX/2016/05/imgui.zip
New description:
I'm trying to make bindings for the imgui C++ library and have encountered
an apparent bug. I'm unable to produce a minimal example so I've packed up
the whole project in a zip file. It only works on Windows for now but I
assume this problem is platform dependant anyways.
There's a module `UI.Imgui` that imports two things. A `FunPtr` wrapping
function and an actual function defined in a .cpp file. Another module
Main imports this module.
If the project is run in a repl (in my case I'm doing `stack repl`) and
then the `test` function is evaluated it results in a GHC panic
{{{#!hs
ghc.exe: panic! (the 'impossible' happened)
(GHC version 7.10.3 for x86_64-unknown-mingw32):
loadObj
"C:\\Users\\Luka\\AppData\\Local\\Temp\\ghc5900_0\\ghc_5.o": failed
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
Now here's the fun part. If you rename the module, file and it's import to
something like Imgui2 it works. If you rename it to UI2.Imgui (with
appropriate folder renaming) it also works!
I'm sure a huge portion of the code is irrelevant. I couldn't reproduce
this with simple .cpp files.
Here's a link to the file (3MB)
https://dl.dropboxusercontent.com/u/35032740/ShareX/2016/05/imgui.zip
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12060#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list