1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Backpatch missing check_stack_depth() to some recursive functions

Backpatch changes from d57b7cc333, 75bcba6cbd to all supported branches per
proposal of Egor Chindyaskin.

Discussion: https://postgr.es/m/DE5FD776-A8CD-4378-BCFA-3BF30F1F6D60%40mail.ru
This commit is contained in:
Alexander Korotkov
2024-02-16 16:02:00 +02:00
parent 6a9e2cb2b4
commit 7607671826
5 changed files with 30 additions and 0 deletions

View File

@@ -2423,6 +2423,10 @@ static Node *
eval_const_expressions_mutator(Node *node,
eval_const_expressions_context *context)
{
/* since this function recurses, it could be driven to stack overflow */
check_stack_depth();
if (node == NULL)
return NULL;
switch (nodeTag(node))