Repository navigation
Commit ec0722a
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 d5112a5 commit ec0722a
2 files changed
Lines changed: 74 additions & 10 deletions
File tree
- packages/mysql-on-sqlite
- src/sqlite
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
| 610 | + | |
615 | 611 | | |
616 | 612 | | |
617 | 613 | | |
| |||
635 | 631 | | |
636 | 632 | | |
637 | 633 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
| 634 | + | |
643 | 635 | | |
644 | 636 | | |
645 | 637 | | |
| |||
1061 | 1053 | | |
1062 | 1054 | | |
1063 | 1055 | | |
| 1056 | + | |
| 1057 | + | |
1064 | 1058 | | |
1065 | 1059 | | |
1066 | 1060 | | |
| |||
1213 | 1207 | | |
1214 | 1208 | | |
1215 | 1209 | | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1216 | 1237 | | |
1217 | 1238 | | |
1218 | 1239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
393 | 436 | | |
394 | 437 | | |
395 | 438 | | |
| |||
0 commit comments