I have prebuilt static libraries for *nix and for Windows which I got http://gnuwin32.sourceforge.net/packages/pcre.htm
I am trying to use recomp, regexec and regfree to do some quick and dirty text parsing. Here is a rough snippet of code
regex_t reg;
regmatch_t regm[1];
res = regcomp(®, "are", 0);
res = regexec(®, "how are you", 1, regm, 0);
regfree(®);
Debugging through it, shows that both calls to regcomp and regexec are successful and "are" is correctly spotted. Disaster strikes when I call regfree though. On RHEL, it seg faults and on Windows XP it asserts.
Now I can see why it would do that assuming regcomp returned res != 0 but everything is fine.
Anybody have any ideas??? :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have prebuilt static libraries for *nix and for Windows which I got http://gnuwin32.sourceforge.net/packages/pcre.htm
I am trying to use recomp, regexec and regfree to do some quick and dirty text parsing. Here is a rough snippet of code
regex_t reg;
regmatch_t regm[1];
res = regcomp(®, "are", 0);
res = regexec(®, "how are you", 1, regm, 0);
regfree(®);
Debugging through it, shows that both calls to regcomp and regexec are successful and "are" is correctly spotted. Disaster strikes when I call regfree though. On RHEL, it seg faults and on Windows XP it asserts.
Now I can see why it would do that assuming regcomp returned res != 0 but everything is fine.
Anybody have any ideas??? :(
regfree() crashes on me too with PCRE6 from GnuWin32. PCRE5 doesn't crash in the same situation.
I was searching the archives to see it was a known issue... Maybe someone will have a suggestion this time (file a bug report?).