Author: philip
Date: Mon Mar 20 01:20:29 2023
New Revision: 1908545

URL: http://svn.apache.org/viewvc?rev=1908545&view=rev
Log:
Fix a one definition rule (ODR) violation: explicitly linking
to both the libsvn_subr amalgation wrapper and the libsvn_subr
library is wrong. It's typically not a bug in a static build
because the linker will usually not pull the unneeded file from
the static library, but in a shared build the whole library is
used at runtime. It was harmless in practice because the symbols
were the same, so it didn't matter which ones were used, but an
ODR violation is strictly undefined behaviour, even in
non-amalgamtion builds when only a dummy symbol gets redefined.
GCC's santizer detects ODR violations.

* build.conf (wc-queries-test): Don't link SQLite wrapper.

Modified:
    subversion/trunk/build.conf

Modified: subversion/trunk/build.conf
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1908545&r1=1908544&r2=1908545&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Mon Mar 20 01:20:29 2023
@@ -1337,7 +1337,7 @@ msvc-force-static = yes
 description = Test Sqlite query evaluation
 type = exe
 path = subversion/tests/libsvn_wc
-sources = wc-queries-test.c ../../libsvn_subr/sqlite3wrapper.c
+sources = wc-queries-test.c
 install = test
 libs = libsvn_test libsvn_wc libsvn_subr apriconv apr sqlite
 


Reply via email to