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

Kezdőlap
Üzenet törlése
Szerző: admin
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 1803] segfault in pcre jit when running twig test suite (PHP7)
https://bugs.exim.org/show_bug.cgi?id=1803

--- Comment #13 from Zoltan Herczeg <hzmester@???> ---
> (gdb) print last_match
> $6 = 0x7fffed43e1fc "\303\237\343\201\224a"
> (gdb) print &subject[offsets[0]]-last_match
> $7 = -2


That is likely incorrect. I think we soon find this bug.

If I understand correctly, there is a loop in php_pcre_split_impl which
construct a list from the non-matching parts of the string:

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

However, there are lots of conditions in the loop, and certain variables are
updated conditionally.

Could you check how last_match, count, offsets[0], and offsets[1] are updated
during each iteration of this loop?

(Btw that /./us pattern for stepping a character ahead must be a joke. That is
the most inefficint way I could imagine.)

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