#include <assert.h>
#include <regex.h>
#include <stdio.h>
int main(int argc, char **argv)
{
int rc;
regex_t preg;
regmatch_t pmatch[2];
rc = regcomp(&preg, "()*)|\\1)*", REG_EXTENDED);
assert(rc == 0);
regexec(&preg, "", 2, pmatch, 0);
regfree(&preg);
return 0;
}pop_fail_stack: pop_fail_stack.c:12: main: Assertion `rc == 0' failed.Aborted (core dumped)As describes the Debian bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779392), the test program compiles an invalid regexp and then tries to match a string against it, triggers an assertion:
So, in my scenario, the test program does not even successfully compile the invalid regexp.
Did anyone encounter this issue?
Could you please help me with this?