forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb6ab18a
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 parent8aa9a26 commitb6ab18a
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 |
| |
| |||
639 | 640 |
| |
640 | 641 |
| |
641 | 642 |
| |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
642 | 649 |
| |
643 | 650 |
| |
644 | 651 |
| |
| |||
662 | 669 |
| |
663 | 670 |
| |
664 | 671 |
| |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
665 | 678 |
| |
666 | 679 |
| |
667 | 680 |
| |
| |||
1705 | 1718 |
| |
1706 | 1719 |
| |
1707 | 1720 |
| |
| 1721 | + | |
| 1722 | + | |
1708 | 1723 |
| |
1709 | 1724 |
| |
1710 | 1725 |
| |
|
0 commit comments
Comments
(0)