From: | John Naylor <john(dot)naylor(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Bring some MSVC asserts in line with other platforms |
Date: | 2023-07-31 07:55:33 |
Message-ID: | E1qQNka-0027Pv-2Y@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Bring some MSVC asserts in line with other platforms
MSVC's _BitScan* functions return a boolean indicating whether any
bits were set in the input, and we were previously asserting that
they returned true, per our API. This is correct. However, other
platforms simply assert that the input is non-zero, so do that to be
more consistent.
Noted while investigating a hypothesis from Ranier Vilela about
undefined behavior, but this is not his proposed patch.
Discussion: https://www.postgresql.org/message-id/CAEudQAoDhUZyKGJ1vbMGcgVUOcsixe-%3DjcVaDWarqkUg163D2w%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/39055cb4ccd5b521ceb802b6a8194de912a422cc
Modified Files
--------------
src/include/port/pg_bitutils.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-07-31 08:12:49 | pgsql: Support custom wait events for wait event type "Extension" |
Previous Message | Michael Paquier | 2023-07-31 07:21:05 | pgsql: Add WAIT_EVENT_{CLASS,ID}_MASK in wait_event.c |