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

Top Page
Delete this message
Author: admin
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1803] segfault in pcre jit when running twig test suite (PHP7)
https://bugs.exim.org/show_bug.cgi?id=1803

--- Comment #3 from Nish Aravamudan <nish.aravamudan@???> ---
(In reply to Zoltan Herczeg from comment #1)
> From the backtrace this is strange:
>
> zend_string_init (persistent=0, len=18446744073709551614,
>     str=0x7fffed43e1fc "\303\237\343\201\224a")

>
> len=18446744073709551614 seems too big (in hex it is 0x1999999999999999
> which is a strange value). Especially because the subject len is 10.
>
> I think it would be good to put a breakpoint where the pcre returns with the
> offsets and check start and end. It would be also good to check how that big
> len is computed.


Apologies, I had this in my bug report for PHP
(https://bugs.php.net/bug.php?id=71659):

(gdb) print subject
$3 = 0x7fffed43e1f8 "\303\251\303\204\303\237\343\201\224a"
(gdb) print offsets
$4 = (int *) 0x7fffffff9150
(gdb) print offsets[0]
$5 = 2
(gdb) print last_match
$6 = 0x7fffed43e1fc "\303\237\343\201\224a"
(gdb) print &subject[offsets[0]]-last_match
$7 = -2

I'll put in a breakpoint as you suggested and see what I can figure out. I am
new to pcre, so I apologize in advance if I ask dumb questions :)

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