#13112: Windows 64-bit GHC HEAD segfaults on the code with a lot of TH stuff. ---------------------------------+-------------------------------------- Reporter: awson | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by RyanGlScott): tysonzero, I am unable to reproduce the segfault you're experiencing. Is this the program you're using from https://github.com/yesodweb/persistent/issues/794#issuecomment-370539509 ? (I had to guess some details you left out.) {{{#!hs {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE TypeApplications #-} module Main where import "monad-logger" Control.Monad.Logger import "transformers" Control.Monad.Trans.Reader import "persistent-postgresql" Database.Persist.Postgresql main :: IO () main = runNoLoggingT . withPostgresqlConn "<connection string>" . runReaderT @SqlBackend $ pure () }}} {{{ $ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.2.2 $ ghc -- Bug.hs -O2 -fforce-recomp [1 of 1] Compiling Main ( Bug.hs, Bug.o ) Linking Bug.exe ... $ ./Bug.exe Bug.exe: SqlError {sqlState = "", sqlExecStatus = FatalError, sqlErrorMsg = "missing \"=\" after \"<connection\" in connection info string\n", sqlErrorDetail = "", sqlErrorHint = ""} }}} The same thing happens with I compile with `-O0`, or when using `runghc`. The dependencies I am using: {{{ aeson-1.2.3.0 async-2.1.1.1 attoparsec-0.13.2.0 attoparsec-iso8601-1.0.0.0 auto-update-0.1.4 base-compat-0.9.3 base64-bytestring-1.0.0.1 blaze-builder-0.4.0.2 blaze-html-0.9.0.1 blaze-markup-0.8.0.0 bytestring-builder-0.10.8.1.0 cabal-doctest-1.0.6 case-insensitive-1.2.0.10 conduit-1.2.12.1 conduit-extra-1.2.3.1 dlist-0.8.0.3 easy-file-0.2.1 exceptions-0.8.3 fail-4.9.0.0 fast-logger-2.4.10 hashable-1.2.6.1 http-api-data-0.3.7.1 http-types-0.9.1 integer-logarithms-1.0.2 lifted-base-0.2.3.11 mmorph-1.1.0 monad-control-1.0.2.2 monad-logger-0.3.26 monad-loops-0.4.3 mtl-2.2.1 network-2.6.3.2 old-locale-1.0.0.7 path-pieces-0.2.1 persistent-2.7.1 persistent-postgresql-2.6.2.1 postgresql-libpq-0.9.3.1 postgresql-simple-0.5.3.0 primitive-0.6.2.0 random-1.1 resource-pool-0.2.3.2 resourcet-1.1.10 scientific-0.3.5.2 silently-1.2.5 stm-2.4.4.1 stm-chans-3.0.0.4 streaming-commons-0.1.18 tagged-0.8.5 text-1.2.2.2 th-abstraction-0.2.6.0 th-lift-0.7.7 th-lift-instances-0.1.11 time-locale-compat-0.1.1.3 transformers-base-0.4.4 transformers-compat-0.5.1.4 typed-process-0.2.0.0 unliftio-core-0.1.0.0 unordered-containers-0.2.8.0 uri-bytestring-0.3.1.0 uuid-types-1.0.3 vector-0.12.0.1 zlib-0.6.1.2 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13112#comment:22> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler