- Notifications
You must be signed in to change notification settings - Fork28
Commit8b56928
committed
Add a stack overflow check to copyObject().
There are some code paths, such as SPI_execute(), where we invokecopyObject() on raw parse trees before doing parse analysis on them. Sincethe bison grammar is capable of building heavily nested parsetrees whileitself using only minimal stack depth, this means that copyObject() can bethe front-line function that hits stack overflow before anything else does.Accordingly, it had better have a check_stack_depth() call. I did a bit ofperformance testing and found that this slows down copyObject() by only afew percent, so the hit ought to be negligible in the context of completeprocessing of a query.Per off-list report from Toshihide Katayama. Back-patch to all supportedbranches.1 parentaf1a614 commit8b56928
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
| |||
3667 | 3668 |
| |
3668 | 3669 |
| |
3669 | 3670 |
| |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
3670 | 3674 |
| |
3671 | 3675 |
| |
3672 | 3676 |
| |
|
0 commit comments
Comments
(0)