#4860: Text.Regex crasher
------------------------+---------------------------------------------------
    Reporter:  batkins  |       Owner:                
        Type:  bug      |      Status:  new           
    Priority:  normal   |   Component:  libraries/base
     Version:  7.0.1    |    Keywords:  regex crash   
    Testcase:           |   Blockedby:                
          Os:  MacOS X  |    Blocking:                
Architecture:  x86      |     Failure:  Runtime crash 
------------------------+---------------------------------------------------

Comment(by maeder):

 {{{
 splitRegex (mkRegex "[ \t\n\r\v\f]+") "foo bar"
 }}}

 works for me (with a 64Bit ghc-7.0.1)

 {{{
 m18:~ maeder$ ghci
 GHCi, version 7.0.1: 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 ffi-1.0 ... linking ... done.
 Prelude> :m +Text.Regex
 Prelude Text.Regex> splitRegex (mkRegex "[ \t\n\r\v\f]+") "foo bar"
 Loading package array-0.3.0.2 ... linking ... done.
 Loading package containers-0.4.0.0 ... linking ... done.
 Loading package bytestring-0.9.1.8 ... linking ... done.
 Loading package transformers-0.2.2.0 ... linking ... done.
 Loading package mtl-2.0.1.0 ... linking ... done.
 Loading package regex-base-0.93.2 ... linking ... done.
 Loading package regex-posix-0.94.4 ... linking ... done.
 Loading package regex-compat-0.93.1 ... linking ... done.
 ["foo","bar"]
 Prelude Text.Regex> :q
 Leaving GHCi.
 m18:~ maeder$ ghc --info
  [("Project name","The Glorious Glasgow Haskell Compilation System")
  ,("Project version","7.0.1")
  ,("Booter version","6.10.4")
  ,("Stage","2")
  ,("Build platform","x86_64-apple-darwin")
  ,("Host platform","x86_64-apple-darwin")
  ,("Target platform","x86_64-apple-darwin")
  ,("Have interpreter","YES")
  ,("Object splitting","NO")
  ,("Have native code generator","YES")
  ,("Have llvm code generator","YES")
  ,("Use archives for ghci","True")
  ,("Support SMP","YES")
  ,("Unregisterised","NO")
  ,("Tables next to code","YES")
  ,("RTS ways","l debug  thr thr_debug thr_l thr_p ")
  ,("Leading underscore","YES")
  ,("Debug on","False")
 ...
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to