[GHC] #9413: Outputable instance for Unique sometimes generates null bytes

GHC ghc-devs at haskell.org
Tue Aug 5 17:57:20 UTC 2014


#9413: Outputable instance for Unique sometimes generates null bytes
-------------------------------------+-------------------------------------
       Reporter:  ezyang             |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Compiler           |                 Version:  7.9
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:  Other
     Blocked By:                     |               Test Case:
Related Tickets:                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 Steps to reproduce:

 {{{
 [ezyang at hs01 ghc-validate]$ inplace/bin/ghc-stage2 --interactive -package
 ghc
 GHCi, version 7.9.20140805: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package array-0.5.0.0 ... linking ... done.
 Loading package deepseq-1.3.0.2 ... linking ... done.
 Loading package bytestring-0.10.4.0 ... linking ... done.
 Loading package containers-0.5.5.1 ... linking ... done.
 Loading package filepath-1.3.0.2 ... linking ... done.
 Loading package old-locale-1.0.0.6 ... linking ... done.
 Loading package time-1.4.2 ... linking ... done.
 Loading package unix-2.7.0.2 ... linking ... done.
 Loading package directory-1.2.1.0 ... linking ... done.
 Loading package pretty-1.1.1.1 ... linking ... done.
 Loading package process-1.2.0.0 ... linking ... done.
 Loading package Cabal-1.21.0.0 ... linking ... done.
 Loading package binary-0.7.1.0 ... linking ... done.
 Loading package bin-package-db-0.0.0.0 ... linking ... done.
 Loading package hoopl-3.10.0.1 ... linking ... done.
 Loading package hpc-0.6.0.1 ... linking ... done.
 Loading package template-haskell ... linking ... done.
 Loading package transformers-0.4.1.0 ... linking ... done.
 Loading package ghc ... linking ... done.
 Prelude> :m +Unique
 Prelude Unique> :m +Outputable
 Prelude Unique Outputable> :m +FastString
 Prelude Unique Outputable FastString> :m +DynFlags
 Prelude Unique Outputable FastString DynFlags> showSDoc (defaultDynFlags
 undefined) $ ppr (getUnique (mkFastString "foo"))
 "\NUL3bS"
 }}}

 We should do something so this doesn't happen. Caused grief due to #9395

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


More information about the ghc-tickets mailing list