pgsql: Fix unsafe references to errno within error messaging logic.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix unsafe references to errno within error messaging logic.
Дата
Msg-id E1W8g42-0006ZK-P1@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix unsafe references to errno within error messaging logic.

Various places were supposing that errno could be expected to hold still
within an ereport() nest or similar contexts.  This isn't true necessarily,
though in some cases it accidentally failed to fail depending on how the
compiler chanced to order the subexpressions.  This class of thinko
explains recent reports of odd failures on clang-built versions, typically
missing or inappropriate HINT fields in messages.

Problem identified by Christian Kruse, who also submitted the patch this
commit is based on.  (I fixed a few issues in his patch and found a couple
of additional places with the same disease.)

Back-patch as appropriate to all supported branches.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bf8ee6f157fa587f1c71bc9252e53a34bdc4e8be

Modified Files
--------------
src/backend/commands/tablespace.c |    6 +++++-
src/backend/port/sysv_sema.c      |   14 ++++++++++----
src/backend/port/sysv_shmem.c     |   25 ++++++++++++++-----------
3 files changed, 29 insertions(+), 16 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix unsafe references to errno within error messaging logic.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix unsafe references to errno within error messaging logic.