File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 55- MySQLi:
66 . Fixed bug #81494 (Stopped unbuffered query does not throw error). (Nikita)
77
8+ - PCRE:
9+ . Fixed bug #81424 (PCRE2 10.35 JIT performance regression). (cmb)
10+
811- Streams:
912 . Fixed bug #54340 (Memory corruption with user_filter). (Nikita)
1013
Original file line number Diff line number Diff line change @@ -1249,10 +1249,13 @@ SLJIT_ASSERT(*cc == OP_ONCE || *cc == OP_BRA || *cc == OP_CBRA);
12491249SLJIT_ASSERT (* cc != OP_CBRA || common -> optimized_cbracket [GET2 (cc , 1 + LINK_SIZE )] != 0 );
12501250SLJIT_ASSERT (start < EARLY_FAIL_ENHANCE_MAX );
12511251
1252+ next_alt = cc + GET (cc , 1 );
1253+ if (* next_alt == OP_ALT )
1254+ fast_forward_allowed = FALSE;
1255+
12521256do
12531257 {
12541258 count = start ;
1255- next_alt = cc + GET (cc , 1 );
12561259 cc += 1 + LINK_SIZE + ((* cc == OP_CBRA ) ? IMM2_SIZE : 0 );
12571260
12581261 while (TRUE)
15211524 {
15221525 count ++ ;
15231526
1524- if (fast_forward_allowed && * next_alt == OP_KET )
1527+ if (fast_forward_allowed )
15251528 {
15261529 common -> fast_forward_bc_ptr = accelerated_start ;
15271530 common -> private_data_ptrs [(accelerated_start + 1 ) - common -> start ] = ((* private_data_start ) << 3 ) | type_skip ;
15691572 else if (result < count )
15701573 result = count ;
15711574
1572- fast_forward_allowed = FALSE;
15731575 cc = next_alt ;
1576+ next_alt = cc + GET (cc , 1 );
15741577 }
15751578while (* cc == OP_ALT );
15761579
@@ -11152,7 +11155,7 @@ early_fail_type = (early_fail_ptr & 0x7);
1115211155early_fail_ptr >>= 3 ;
1115311156
1115411157/* During recursion, these optimizations are disabled. */
11155- if (common -> early_fail_start_ptr == 0 )
11158+ if (common -> early_fail_start_ptr == 0 && common -> fast_forward_bc_ptr == NULL )
1115611159 {
1115711160 early_fail_ptr = 0 ;
1115811161 early_fail_type = type_skip ;
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Bug #81424 (PCRE2 10.35 JIT performance regression)
3+ --DESCRIPTION--
4+ We're testing against the functional regression which has been introduced by
5+ fixing the performance regression.
6+ --FILE--
7+ <?php
8+ var_dump (
9+ preg_match ('/(?P<size>\d+)m|M/ ' , "4M " , $ m ),
10+ $ m
11+ );
12+ ?>
13+ --EXPECT--
14+ int(1)
15+ array(1) {
16+ [0]=>
17+ string(1) "M"
18+ }
You can’t perform that action at this time.
0 commit comments