Skip to content
Snippets Groups Projects
Denis Smirnov's avatar
Denis Smirnov authored
clang 13 includes a check for subtraction from NULL pointer which
is considered UB: historically, we had an alignment checking macro
which is affected by this. It seems like the intention of the
macro's author was to implicitly cast the pointer being checked to
uintptr_t without including stddef.h — replace this subtraction
with an explicit cast.

There is no way to set SQL_4_BYTE_ALIGNED_MALLOC, so the corresponding
part of the code was removed. Now there are only 8 byte alignment
assertions.

NO_CHANGELOG=UB fix
NO_DOC=UB fix
NO_TEST=UB fix

Co-authored-by: default avatarGeorgiy Lebedev <curiousgeorgiy@gmail.com>
0289433a
History
Name Last commit Last update