Since libtsan.a already has them:
ld.lld: error: duplicate symbol: RunningOnValgrind
>>> defined at dynamic_annotations.cc:99 (../contrib/abseil-cpp/absl/base/dynamic_annotations.cc:99)
>>> dynamic_annotations.cc.o:(RunningOnValgrind) in archive contrib/abseil-cpp/absl/base/libabsl_dynamic_annotations.a
>>> defined at tsan_interface_ann.o:(.text+0x15A0) in archive /usr/lib/gcc/x86_64-linux-gnu/10/libtsan.a
ld.lld: error: duplicate symbol: AnnotateMemoryIsInitialized
>>> defined at dynamic_annotations.cc:75 (../contrib/abseil-cpp/absl/base/dynamic_annotations.cc:75)
>>> dynamic_annotations.cc.o:(AnnotateMemoryIsInitialized) in archive contrib/abseil-cpp/absl/base/libabsl_dynamic_annotations.a
>>> defined at tsan_interface_ann.o:(.text+0x1600) in archive /usr/lib/gcc/x86_64-linux-gnu/10/libtsan.a
ld.lld: error: duplicate symbol: AnnotateMemoryIsUnt show initialized
>>> defined at dynamic_annotations.cc:75 (../contrib/abseil-cpp/absl/base/dynamic_annotations.cc:75)
>>> dynamic_annotations.cc.o:(AnnotateMemoryIsUninitialized) in archive contrib/abseil-cpp/absl/base/libabsl_dynamic_annotations.a
>>> defined at tsan_interface_ann.o:(.text+0x1610) in archive /usr/lib/gcc/x86_64-linux-gnu/10/libtsan.a
...
And after this patch I successfully managed to build with thread
sanitizer under gcc.
gcc with -nodefaultlibs does not add sanitizers library during linkage
with -static-libasan and similar, fix this, by add them explicitly.
From the gcc(1) about -nodefaultlibs:
Do not use the standard system libraries when linking. Only the
libraries you specify are passed to the linker, and options specifying
linkage of the system libraries, such as -static-libgcc or
-shared-libgcc, are ignored. The standard startup files are used
normally, unless -nostartfiles is used.
Plus checked it manually, w/o -nodefaultlibs everything works without
this explicit linkage.
After this patch UBSAN under gcc compiled successfully.
v2: freebsd and darwin
INTERFACE_COMPILE_DEFINITIONS does not work IMPORTED targets:
From 3.6:
Specify compile definitions to use when compiling a given <target>.
The named <target> must have been created by a command such as
add_executable() or add_library() and must not be an Imported Target.
Since 3.11:
Specify compile definitions to use when compiling a given <target>.
The named <target> must have been created by a command such as
add_executable() or add_library() and must not be an ALIAS target.
And this causes the -Wundef warning:
src/Functions/FunctionsHashing.h:1326:5: warning: 'USE_XXHASH' is not defined, evaluates to 0 [-Wundef]
Since libstdc++ has some of such compares for 3way compare:
/src/ch/clickhouse/src/Common/UInt128.h:61:71: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
bool inline operator>= (const UInt128 rhs) const { return tuple() >= rhs.tuple(); }
^~
nullptr
/usr/include/c++/10.2.0/tuple:1426:5: note: while rewriting comparison as call to 'operator<=>' declared here
operator<=>(const tuple<_Tps...>& __t, const tuple<_Ups...>& __u)
As @alexey-milovidov wrote.
P.S. I did not use ./utils/release/release_lib.sh (via ./release), since
it is pretty complex (it fetches tags and so on)
The following macros has been updated:
- VERSION_REVISION -- usually bumped with utils/release/release_lib.sh
(interesting that even if there were no changes)
- DBMS_MIN_REVISION_WITH_INTERSERVER_SECRET
- DBMS_TCP_PROTOCOL_VERSION -- does not affect anything, some internal
yandex stuff
Functions to encrypt/decrypt any input data with OpenSSL's ciphers
with custom key, iv, and add (-gcm mode only).
_mysql versions are 100% compatitable with corresponding MySQL functions
Supported modes depend on OpenSSL version, but generally are:
aes-{128,192,56}-{ecb,cbc,cfb1,cfb8,cfb128,ofb,gcm}
Please note that in a -gcm mode a 16-byte tag is appended to the ciphertext
on encryption and is expected to be found at the end of ciphertext on decryption.
Added tests that verify compatibility with MySQL functions,
and test vectors for GCM mode from OpenSSL.
Added masking rules for aes_X funtions
Rules are installed by default to config.d/query_masking_rules.xml
even if UNBUNDLED=ON because libbrotli*.a and similar are not
available in most of the systems
Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>