[GHC] #9128: Possible bug in strictness analyzer when where clause declared NOINLINE

GHC ghc-devs at haskell.org
Tue May 20 00:08:29 UTC 2014


#9128: Possible bug in strictness analyzer when where clause declared NOINLINE
---------------------------------+-----------------------------------------
        Reporter:  aalevy        |            Owner:
            Type:  bug           |           Status:  new
        Priority:  normal        |        Milestone:
       Component:  Compiler      |          Version:  7.8.2
      Resolution:                |         Keywords:  strictness bytestring
Operating System:                |     Architecture:  Unknown/Multiple
  Unknown/Multiple               |       Difficulty:  Unknown
 Type of failure:  Runtime       |       Blocked By:
  crash                          |  Related Tickets:
       Test Case:                |
        Blocking:                |
---------------------------------+-----------------------------------------

Comment (by aalevy):

 Yes, sorry.

 From a fresh install with ghc-7.8.2 and cabal (1.20 in my case, but since
 it's just for installing dependencies, and I don't think default
 optimization levels have changed recently, I suspect it doesn't matter):

 0. Prerequisites: postgresql (I'm using 9.3, but probably doesn't matter)
 with tools (specifically pg_ctl). Tools, for example, are not installed by
 default on the postgresql version that comes with OS X -- you have to
 install from homebrew I think. pg_ctl comes with postgresql on most
 distros of linux though. Unfortunately, I don't know about windows and
 don't have an install available to test with.

 1. Grab the unpatched version of the postgresql-orm from github:
 {{{
 $ git clone https://github.com/alevy/postgresql-orm.git
 $ cd postgresql-orm
 $ git checkout 93075d56ae5ffeb8f80ecc8c01436713c2656a6b
 }}}

 2. Install library dependencies (inside a cabal sandbox if you care about
 not polluting your global environment):
 {{{
 $ cabal sandbox init
 $ cabal install --only-dependencies
 }}}

 3. Copy test.hs into the project directory

 4. Compile with O1:
 {{{
 $ ghc -O1 test.hs -package-db ./.cabal-sandbox/x86_64-linux-
 ghc-7.8.2-packages.conf.d
 }}}

 5. Run:

 {{{
 $ ./test
 test: Oops!  Entered absent arg a_sYDl{v} [lid]
 bytestring-0.10.4.0:Data.ByteString.Internal.ByteString{tc r5T}
 }}}

 All the machines I've tested this on are running Arch Linux, with
 ghc-7.8.2

 Are there any steps I haven't thought to include?

 Thanks!
 -amit

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


More information about the ghc-tickets mailing list