diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2023-06-24 17:18:08 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2023-06-24 17:18:08 -0400 |
commit | 691594acd67e68d903ea1b7575a7a9097772bbcb (patch) | |
tree | 29563d13000c5f518490d6cd82efee3829af002b /src/backend/commands/explain.c | |
parent | 239fd118b0923c7b3e28354e13fb7cea42f729e1 (diff) | |
download | postgresql-691594acd67e68d903ea1b7575a7a9097772bbcb.tar.gz postgresql-691594acd67e68d903ea1b7575a7a9097772bbcb.zip |
Check for interrupts and stack overflow in TParserGet().
TParserGet() recurses for some token types, meaning it's possible
to drive it to stack overflow. Since this is a minority behavior,
I chose to add the check_stack_depth() call to the two places that
recurse rather than doing it during every single call.
While at it, add CHECK_FOR_INTERRUPTS(), because this can run
unpleasantly long for long inputs.
Per bug #17995 from Zuming Jiang. This is old, so back-patch
to all supported branches.
Discussion: https://postgr.es/m/17995-9f20ff3e6389db4c@postgresql.org
Diffstat (limited to 'src/backend/commands/explain.c')
0 files changed, 0 insertions, 0 deletions