RE: Program crash with regex wrapper after translation

new topic     » topic index » view thread      » older message » newer message

Robert Craig wrote:
> Andy Serpa writes:
> > I've been using Karl Bochert's wrappers (regex.zip in the archive) for 
> > the PCRE regular expression library, which work great under the 
> > interpreter, but when translated to C causes a crash whenever the 
> > regex_free function is called (which frees up memory when you are done 
> > with a compiled pattern).
> 
> Check the argument that's passed to regex_free().
> It's possible that it's wrong when you use the interpreter,
> but it just doesn't cause a crash. If it looks ok,
> then please send me a small program that works
> with the 2.3 alpha interpreter, but not with the 2.3 alpha translator.
> If you are still using the 2.2 translator, please install 2.3 alpha,
> interpreter and translator.
> 
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    http://www.RapidEuphoria.com
> 
> 
You don't even need to have regex_free in your code to cause the crash 
-- if you don't use the regex_compile function before using regex_find, 
regex_find calls regex_compile itself, performs the find, and then calls 
regex_free.

So ANY call in ANY program to regex_find without regex_compile in your 
own code (or with it, but then you have to call regex_free yourself) 
will cause the crash.  I should have mentioned I'm using all the latest 
versions of the interpreter & translator (unregistered) and am on a 
WinME system.  I tried compiling with both Borland & lccWin, same 
result.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu