Repository navigation
Commit f58ecfe
committed
Retry a REGEXP match without JIT when its stack runs out
PHP's JIT stack is small, so a repeated group like '(a|b)*' failed
with "exceeded internal limits" on a subject of about 6,000
characters. MySQL matches such subjects, and trunk silently treated
them as not matching.
On PHP 7.3+, retry such a match with "(*NO_JIT)", which raises the
limit to about 50,000 characters. PHP 7.2 has no "(*NO_JIT)", and
matching without JIT can crash it, so it keeps the JIT limit of about
2,000 characters. Document the remaining limit.1 parent 2b6f674 commit f58ecfe
2 files changed
Lines changed: 67 additions & 10 deletions
File tree
- packages/mysql-on-sqlite
- src/sqlite
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 613 | + | |
618 | 614 | | |
619 | 615 | | |
620 | 616 | | |
| |||
634 | 630 | | |
635 | 631 | | |
636 | 632 | | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
| 633 | + | |
642 | 634 | | |
643 | 635 | | |
644 | 636 | | |
| |||
1060 | 1052 | | |
1061 | 1053 | | |
1062 | 1054 | | |
| 1055 | + | |
| 1056 | + | |
1063 | 1057 | | |
1064 | 1058 | | |
1065 | 1059 | | |
| |||
1198 | 1192 | | |
1199 | 1193 | | |
1200 | 1194 | | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1201 | 1222 | | |
1202 | 1223 | | |
1203 | 1224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
366 | 402 | | |
367 | 403 | | |
368 | 404 | | |
| |||
0 commit comments