[pcre-dev] [Bug 1803] segfault in pcre jit when running twig…

Góra strony
Delete this message
Autor: admin
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1803] segfault in pcre jit when running twig test suite (PHP7)
https://bugs.exim.org/show_bug.cgi?id=1803

--- Comment #21 from Zoltan Herczeg <hzmester@???> ---
Another idea just came to my mind.

It seems that all patterns are compiled by pcre_compile here:

https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L433

Would it be possible to dump all regex compilation to some file after this
call?

E.g.

re = pcre_compile(pattern,
          coptions,
          &error,
          &erroffset,
          tables);


FILE *f = fopen("dump_file", "a"); // appending at the end
fprintf(f, "/%s/ 0x%x -> %p\n", pattern, coptions, re);
fclose(f);

It would be easy to find the offending pattern from this list. Just find the
latest entry which has the same address as pce->re.

--
You are receiving this mail because:
You are on the CC list for the bug.