Skip to content

Commit cb19cd9

Browse files
Fix assertion on dereferenced object
Commit 27cc7cd accidentally placed the assertion ensuring that the pointer isn't NULL after it had already been accessed. Fix by moving the pointer dereferencing to after the assertion. Backpatch to all supported branches. Author: Dmitry Koval <d.koval@postgrespro.ru> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/1618848d-cdc7-414b-9c03-08cf4bef4408@postgrespro.ru Backpatch-through: 13
1 parent a37c83d commit cb19cd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/executor/execMain.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2631,13 +2631,15 @@ bool
26312631
EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)
26322632
{
26332633
ExecAuxRowMark *earm = epqstate->relsubs_rowmark[rti - 1];
2634-
ExecRowMark *erm = earm->rowmark;
2634+
ExecRowMark *erm;
26352635
Datum datum;
26362636
bool isNull;
26372637

26382638
Assert(earm != NULL);
26392639
Assert(epqstate->origslot != NULL);
26402640

2641+
erm = earm->rowmark;
2642+
26412643
if (RowMarkRequiresRowShareLock(erm->markType))
26422644
elog(ERROR, "EvalPlanQual doesn't support locking rowmarks");
26432645

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy