[Haskell-cafe] Re: user error when using Text.Regex.PCRE
olivier.boudry at gmail.com
Tue Nov 20 10:17:08 EST 2007
On Nov 20, 2007 9:36 AM, ChrisK <haskell at list.mightyreason.com> wrote:
> Thank you very much for the error report. I have tracked down the cause.
> You are searching against an empty Bytestring. This is now represented by
> > -- | /O(1)/ The empty 'ByteString'
> > empty :: ByteString
> > empty = PS nullForeignPtr 0 0
> And while the useAsCString and useAsCStringLen functions never reveal the
> pointer, the current library uses unsafeUseAsCStringLen, which returns the
> And this is getting caught by a null pointer check resulting in your
> crash. I
> will post a fix later tonight, and announce it.
> Which regex-prce version are you using? Perhaps from hackage? I want to
> prioritize the version you need fixed.
> The earlier repository holds up to version 0.81 at
> The newer repository holds up to version 0.92 at
> Out of further curiosity:
> Which version of the pcre library does it use?
> And what version of ghc?
> Which version of Data.ByteString?
> Chris Kuklewicz
I'm using ghc-6.8.1, regex-pcre-0.92, bytestring-0.9.0.1 and libpcre-7.4.
Using your information, I might be able to workaround the problem by
filtering out empty bytestrings before applying the next regex.
Thanks for your reply,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe