forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4c61afa
committed
Check for interrupts and stack overflow in TParserGet().
TParserGet() recurses for some token types, meaning it's possibleto drive it to stack overflow. Since this is a minority behavior,I chose to add the check_stack_depth() call to the two places thatrecurse rather than doing it during every single call.While at it, add CHECK_FOR_INTERRUPTS(), because this can rununpleasantly long for long inputs.Per bug #17995 from Zuming Jiang. This is old, so back-patchto all supported branches.Discussion:https://postgr.es/m/17995-9f20ff3e6389db4c@postgresql.org1 parentc158992 commit4c61afa
1 file changed
+15
-0
lines changedLines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
632 | 633 |
| |
633 | 634 |
| |
634 | 635 |
| |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
635 | 642 |
| |
636 | 643 |
| |
637 | 644 |
| |
| |||
655 | 662 |
| |
656 | 663 |
| |
657 | 664 |
| |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
658 | 671 |
| |
659 | 672 |
| |
660 | 673 |
| |
| |||
1698 | 1711 |
| |
1699 | 1712 |
| |
1700 | 1713 |
| |
| 1714 | + | |
| 1715 | + | |
1701 | 1716 |
| |
1702 | 1717 |
| |
1703 | 1718 |
| |
|
0 commit comments
Comments
(0)