summaryrefslogtreecommitdiff
path: root/src/backend/commands/async.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-12-06 22:56:02 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2010-12-06 22:56:02 -0500
commitee6c8875a567c591a6602a40f4c064641806e4bc (patch)
tree4ed24a2ff1e2c4df596943952d73991a9080420a /src/backend/commands/async.c
parent0d45e8c560793aa4c4b278a0ce7c002735f37ea5 (diff)
Add a stack overflow check to copyObject().
There are some code paths, such as SPI_execute(), where we invoke copyObject() on raw parse trees before doing parse analysis on them. Since the bison grammar is capable of building heavily nested parsetrees while itself using only minimal stack depth, this means that copyObject() can be the 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 of performance testing and found that this slows down copyObject() by only a few percent, so the hit ought to be negligible in the context of complete processing of a query. Per off-list report from Toshihide Katayama. Back-patch to all supported branches.
Diffstat (limited to 'src/backend/commands/async.c')
0 files changed, 0 insertions, 0 deletions