- Notifications
You must be signed in to change notification settings - Fork5.1k
Commit2faab1a
committed
Check for stack overflow in transformSetOperationTree().
Since transformSetOperationTree() recurses, it can be driven to stackoverflow with enough UNION/INTERSECT/EXCEPT clauses in a query. Add acheck to ensure it fails cleanly instead of crashing. Per report fromMatthew Gerber (though it's not clear whether this is the only thinggoing wrong for him).Historical note: I think the reasoning behind not putting a check here inthe beginning was that the check in transformExpr() ought to be sufficientto guard the whole parser. However, because transformSetOperationTree()recurses all the way to the bottom of the set-operation tree before doingany analysis of the statement's expressions, that check doesn't save it.1 parent29d539b commit2faab1a
1 file changed
+4
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
1238 | 1239 |
| |
1239 | 1240 |
| |
1240 | 1241 |
| |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1241 | 1245 |
| |
1242 | 1246 |
| |
1243 | 1247 |
| |
|
0 commit comments
Comments
(0)