pgsql: Fix breakage of get_ps_display() in the PS_USE_NONE case. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix breakage of get_ps_display() in the PS_USE_NONE case.
Date
Msg-id E1nYWDd-001dPv-8C@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix breakage of get_ps_display() in the PS_USE_NONE case.

Commit 8c6d30f21 caused this function to fail to set *displen
in the PS_USE_NONE code path.  If the variable's previous value
had been negative, that'd lead to a memory clobber at some call
sites.  We'd managed not to notice due to very thin test coverage
of such configurations, but this appears to explain buildfarm member
lorikeet's recent struggles.

Credit to Andrew Dunstan for spotting the problem.  Back-patch
to v13 where the bug was introduced.

Discussion: https://postgr.es/m/136102.1648320427@sss.pgh.pa.us

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3f7a59c59b4873a3b39838401d590f9d030a3500

Modified Files
--------------
src/backend/utils/misc/ps_status.c | 1 +
1 file changed, 1 insertion(+)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix comment in execParallel.c
Next
From: Tom Lane
Date:
Subject: pgsql: Avoid using large pass-by-value struct arguments in pgbench.