pgsql: Fix segmentation fault in test_tidstore.

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема pgsql: Fix segmentation fault in test_tidstore.
Дата
Msg-id E1sHCIS-0017ie-TY@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(+)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix infer_arbiter_indexes() to not assume resultRelation is 1.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Fix typo in error message