Re: [pcre-dev] access violation in calling pcre_exec via pc…

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: Thorsten Schöning
CC: pcre-dev
Subject: Re: [pcre-dev] access violation in calling pcre_exec via pcrecpp::RE::TryMatch...
On Fri, 3 Dec 2010, Thorsten Schöning wrote:

> No, I work with Windows and we have no tool for that. The Borland
> Builder does provide somethign called code guard though, which checks
> for and logs errors like memory leaks etc. at runtime. But if I
> activate that, the error doesn't occur either. :-(


Sigh. Those are always the hardest bugs to find.

> How do I pass startpos etc. to pcretest?


Include the escape sequence \>dd (for example, \>10) in the subject
text. See the pcretest.1 man page for a full list of all the possible
escapes. However, see below...

> The regex I work with is
> ^[^\d]*1[^\d]*$ on the subject "1" to check that it's 1. But the error
> occurs on any subject or regex, if it occurs, the first time I use
> FullMatch because in that case "options" is set.


It doesn't sound as though pcretest will help you. I'm afraid I am not a
C++ person, so I'm not really familiar with the pcrecpp stuff; I work
down at the C level. Needless to say, a trivial test of your regex with
pcretest on Linux does not show any problem. (I cannot test on Windows.)

> Looks like I have to do some Voodoo again. :-(


I'm afraid so.

Philip

--
Philip Hazel