pgsql: Fix rare core dump in BackendIdGetTransactionIds().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix rare core dump in BackendIdGetTransactionIds().
Date: 2015-03-30 17:05:42
Message-ID: E1Ycd8A-0006dl-En@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix rare core dump in BackendIdGetTransactionIds().

BackendIdGetTransactionIds() neglected the possibility that the PROC
pointer in a ProcState array entry is null. In current usage, this could
only crash if the other backend had exited since pgstat_read_current_status
saw it as active, which is a pretty narrow window. But it's reachable in
the field, per bug #12918 from Vladimir Borodin.

Back-patch to 9.4 where the faulty code was introduced.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2897e069c1f4309a237a1fa4bf5d2fcd9c4b9868

Modified Files
--------------
src/backend/storage/ipc/sinvaladt.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-03-30 18:59:55 pgsql: Be more careful about printing constants in ruleutils.c.
Previous Message Michael Paquier 2015-03-30 11:09:12 Re: pgsql: Centralize definition of integer limits.