- Notifications
You must be signed in to change notification settings - Fork5k
Commit0ae63a4
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 parent8a6eb2e commit0ae63a4
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 |
| |
| |||
2684 | 2685 |
| |
2685 | 2686 |
| |
2686 | 2687 |
| |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
2687 | 2691 |
| |
2688 | 2692 |
| |
2689 | 2693 |
| |
|
0 commit comments
Comments
(0)