1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-09 13:09:39 +03:00

Add missing check_stack_depth() to some recursive functions

Reported-by: Egor Chindyaskin, Alexander Lakhin
Discussion: https://postgr.es/m/1672760457.940462079%40f306.i.mail.ru
This commit is contained in:
Alexander Korotkov
2024-02-16 16:02:00 +02:00
parent eb49e1bdd9
commit d57b7cc333
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))