Re: -DDISABLE_ENABLE_ASSERT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: -DDISABLE_ENABLE_ASSERT
Дата
Msg-id 4650.1400791055@sss.pgh.pa.us
обсуждение исходный текст
Ответ на -DDISABLE_ENABLE_ASSERT  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: -DDISABLE_ENABLE_ASSERT
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> Since there seem to be multiple static checkers (coverity, clang
> checker) having problems with assert_enabled can we just optionally
> disable it?
> I am thinking of replacing it by a AssertionsEnabled() macro which then
> is unconditionally defined when DISABLE_ENABLE_ASSERT is defined.

We could do that ... but I wonder if we shouldn't remove assert_enabled
altogether.  What's the use case for turning it off?  Not matching the
speed of a non-cassert build, because for instance MEMORY_CONTEXT_CHECKING
doesn't get turned off.

If we went this direction I'd suggest keeping the GUC but turning it into
a read-only report of whether the backend was compiled with assertions.
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: -DDISABLE_ENABLE_ASSERT
Следующее
От: Robert Haas
Дата:
Сообщение: Re: -DDISABLE_ENABLE_ASSERT