| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Prevent stack overflow in exprLocation() |
| Date: | 2026-11-26 13:21:46 |
| Message-ID: | E1xWZQ2-00000000Oxx-0DiM@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Prevent stack overflow in exprLocation()
exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth. A statement like:
(SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1
with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".
Author: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail.com
Backpatch-through: 15
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b4548161b94567d8e57bf0efdb8005623e1639da
Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-11-26 13:54:12 | pgsql: Remove incorrect comment on UpdateDeadTupleRetentionStatus |
| Previous Message | Tomas Vondra | 2026-11-26 13:18:55 | pgsql: Fix query ID reporting in parallel workers for GIN index builds |