[GHC] #12396: Panic when specializing in another module

#12396: Panic when specializing in another module -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- In the attached example (which requires `criterion` and `deepseq`), when compiled with `ghc -O2 -funfolding-use-threshold1000 Main.hs`, I get the following error on `Main.hs`: {{{ ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): StgCmmEnv: variable not found $d(%,%)_aaTF local binds for: $trModule $sfool $trModule1 $trModule2 $wlvl_rgY8 lvl_rgY9 lvl1_rgYa lvl3_rgYc lvl4_rgYd lvl5_rgYe lvl6_rgYf lvl7_rgYg lvl8_rgYh lvl9_rgYi lvl10_rgYj lvl11_rgYk lvl12_rgYl lvl13_rgYm lvl14_rgYn lvl15_rgYo lvl16_rgYp lvl17_rgYq lvl18_rgYr lvl19_rgYs lvl20_rgYt lvl21_rgYu lvl22_rgYv lvl23_rgYw lvl24_rgYx lvl25_rgYy lvl26_rgYz lvl27_rgYA lvl28_rgYB lvl29_rgYC lvl30_rgYD lvl31_rgYE lvl32_rgYF lvl33_rgYG lvl34_rgYH lvl35_rgYI lvl36_rgYJ lvl37_rgYK lvl38_rgYL lvl39_rgYM lvl40_rgYN lvl41_rgYO lvl42_rgYP lvl43_rgYQ lvl44_rgYR lvl45_rgYS lvl46_rgYT lvl47_rgYU lvl48_rgYV lvl49_rgYW lvl50_rgYX lvl51_rgYY lvl52_rgYZ lvl53_rgZ0 lvl54_rgZ1 lvl55_rgZ2 lvl56_rgZ3 lvl57_rgZ4 lvl58_rgZ5 lvl59_rgZ6 lvl60_rgZ7 lvl61_rgZ8 lvl62_rgZ9 lvl63_rgZa lvl64_rgZb lvl65_rgZc lvl66_rgZd ww1_rgZe ww2_rgZf ww3_rgZg ww4_rgZh pinfo_rgZi pinfo1_rgZj pinfo2_rgZk pinfo3_rgZl lvl67_rgZm lvl68_rgZn lvl69_rgZo $wgo12_rgZp eta_sh1k wild_sh1l v_sh1m sat_sh1n }}} I initially found this bug when I added a `SPECIALIZE` pragma for `fool` in `Main.hs`. However, I need `funfolding-use-threshold1000` and the constraint synonym `UCRTElt` in `Foo.hs` to trigger the bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12396 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12396: Panic when specializing in another module -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by crockeea): * Attachment "12396.tar" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12396 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12396: Panic when specializing in another module -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by crockeea: @@ -102,1 +102,3 @@ - constraint synonym `UCRTElt` in `Foo.hs` to trigger the bug. + constraint synonym `UCRTElt` in `Foo.hs` to trigger the bug. Every time I + tried to remove `criterion`, the bug stopped triggering, though I + seriously doubt that the bug is in `criterion`. New description: In the attached example (which requires `criterion` and `deepseq`), when compiled with `ghc -O2 -funfolding-use-threshold1000 Main.hs`, I get the following error on `Main.hs`: {{{ ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): StgCmmEnv: variable not found $d(%,%)_aaTF local binds for: $trModule $sfool $trModule1 $trModule2 $wlvl_rgY8 lvl_rgY9 lvl1_rgYa lvl3_rgYc lvl4_rgYd lvl5_rgYe lvl6_rgYf lvl7_rgYg lvl8_rgYh lvl9_rgYi lvl10_rgYj lvl11_rgYk lvl12_rgYl lvl13_rgYm lvl14_rgYn lvl15_rgYo lvl16_rgYp lvl17_rgYq lvl18_rgYr lvl19_rgYs lvl20_rgYt lvl21_rgYu lvl22_rgYv lvl23_rgYw lvl24_rgYx lvl25_rgYy lvl26_rgYz lvl27_rgYA lvl28_rgYB lvl29_rgYC lvl30_rgYD lvl31_rgYE lvl32_rgYF lvl33_rgYG lvl34_rgYH lvl35_rgYI lvl36_rgYJ lvl37_rgYK lvl38_rgYL lvl39_rgYM lvl40_rgYN lvl41_rgYO lvl42_rgYP lvl43_rgYQ lvl44_rgYR lvl45_rgYS lvl46_rgYT lvl47_rgYU lvl48_rgYV lvl49_rgYW lvl50_rgYX lvl51_rgYY lvl52_rgYZ lvl53_rgZ0 lvl54_rgZ1 lvl55_rgZ2 lvl56_rgZ3 lvl57_rgZ4 lvl58_rgZ5 lvl59_rgZ6 lvl60_rgZ7 lvl61_rgZ8 lvl62_rgZ9 lvl63_rgZa lvl64_rgZb lvl65_rgZc lvl66_rgZd ww1_rgZe ww2_rgZf ww3_rgZg ww4_rgZh pinfo_rgZi pinfo1_rgZj pinfo2_rgZk pinfo3_rgZl lvl67_rgZm lvl68_rgZn lvl69_rgZo $wgo12_rgZp eta_sh1k wild_sh1l v_sh1m sat_sh1n }}} I initially found this bug when I added a `SPECIALIZE` pragma for `fool` in `Main.hs`. However, I need `funfolding-use-threshold1000` and the constraint synonym `UCRTElt` in `Foo.hs` to trigger the bug. Every time I tried to remove `criterion`, the bug stopped triggering, though I seriously doubt that the bug is in `criterion`. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12396#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12396: Panic when specializing in another module -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: normal => high Comment: Bumping in priority. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12396#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12396: Panic when specializing in another module -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by zyla): On `HEAD` (`8.1.20170202`) this doesn't cause a panic. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12396#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12396: Panic when specializing in another module -------------------------------------+------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 Comment: I can't reproduce this on GHC 8.2.1 either, so I'll close this as fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12396#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC