2014.2.0.0: 64-bit GHC 7.8.3 under Windows 7 hangs during regex matching
The following code hangs 64-bit ghc 7.8.3 (as well as ghci) under Windows 7:
import Text.Regex
main = print $ matchRegex (mkRegex "^[ ]*ab[ ]*xy[ ]*(.*)[ ]*") "abxy z"
It works fine at 64-bit Ubuntu and 32-bit Windows XP though.
You'll likely get a better response if you report this issue at the GHC bug tracker.
I'll try to report this at GHC tracker. The hang is caused by regex-posix package, which is part of additional set of libraries provided by the Platform, so I thought it would be appropriate to ask here.
Turned out there are already a few (closed though) tickets related to hangs and segfaults provoked by the package.
Under Windows regex-posix is built from C sources which come with the package. Seemingly this C code wasn't properly ported to 64-bit architecture.
You may also want to report this to the maintainer of regex-posix.
@adubovik did you find a way to report this or follow up with the regex-posix maintainer?
(It is still failing in the 7.10.3 rc3 candidate)
@gbaz I didn't. I've switched to regex-tdfa, which doesn't depend on C sources and works just fine.
@adubovik thanks for the update. I think long-term if the platform is going to provide a regex package, it should be one of the tdfa ones, but that's a further discussion :-).