From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix segmentation fault in test_tidstore.
Date: Wed, 12 Jun 2024 00:57:05 +0000
Message-ID: <E1sHCIS-0017ie-TY@gemulon.postgresql.org> (raw)
Fix segmentation fault in test_tidstore.
The do_set_block_offsets() and other functions accessing the tidstore
did not check if the tidstore was NULL. This led to a segmentation
fault when these functions are called without calling the
test_create().
This commit adds NULL checks in relevant functions of test_tidstore to
raise an error instead if the tidstore is not initialized.
Bug: #18483
Reported-by: Alexander Kozhemyakin
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/18483-30bfff42de238000%40postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/18404ea60141a2e2eaf58a5ebbd2b99f7a0cd442
Modified Files
--------------
src/test/modules/test_tidstore/test_tidstore.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix segmentation fault in test_tidstore.
In-Reply-To: <E1sHCIS-0017ie-TY@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox