pgsql: Add assertion to check the special size is sane before dereferen

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add assertion to check the special size is sane before dereferen
Date: 2015-06-30 10:49:17
Message-ID: E1Z9t6L-0006tu-IF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add assertion to check the special size is sane before dereferencing it.

This seems useful to catch errors of the sort I just fixed, where
PageGetSpecialPointer is called before initializing the page.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/302ac7f27197855afa8c89fae36c85c124ae156b

Modified Files
--------------
src/include/storage/bufpage.h | 2 ++
1 file changed, 2 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-06-30 16:54:02 pgsql: Remove useless check for NULL subexpression.
Previous Message Robert Haas 2015-06-30 03:54:26 pgsql: In bttext_abbrev_convert, move pfree to the right place.