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

Top Page
Delete this message
Author: Thorsten Schöning
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] access violation in calling pcre_exec via pcrecpp::RE::TryMatch...
Guten Tag Philip Hazel,
am Freitag, 3. Dezember 2010 um 12:11 schrieben Sie:

> When text.data() == NULL, is text.size() equal to zero?


I don't have that case, there's always text present.

> What are the values of extra, startpos, vec, and vecsize?


extra is the pcrecpp defaults, { 0, 0, 0, 0, 0, 0 }, startpos is 0,
vec and vecsize are pcrecpp default, too, an array and 51.

> Can you run this under valgrind (or similar) to check memory accesses?


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. :-(

> Have you tried matching the same regular expression, subject string,
> options, startpos etc, using the pcretest program? If there is a bug in
> pcre_exec, that *might* show it up. (Again, valgrind could be helpful.)


How do I pass startpos etc. to pcretest? 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 does, of course, do different things when different options are set,
> but without more information, I can't think of anything.


It can't be options alone, too, because the program did work before
with exactly the same regexes and data. I even I tried to add pcre
completely to the project, not using static libs like before, and the
error occurs, but I can't debug pcre_exec, either.

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

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning
AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig

Telefon: Potsdam: 0331-743881-0
E-Mail:  tschoening@???
Web:     http://www.am-soft.de


AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow