diff --git a/Makefile b/Makefile index 61baa3820..4678a1e20 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,11 @@ export SOURCE_DATE_EPOCH ### ``` ### ### ** to use on-demand coredump generation feature, compile code without ASAN option (WITHASAN=0). +### +### NOTES for Valgrind: +### When running Valgrind, SQLite's internal memory allocator may cause false +### positives in pcache*, memjrnl*, and sqlite3Btree* functions. To avoid this, +### rebuild SQLite with -USQLITE_ENABLE_MEMORY_MANAGEMENT in deps/Makefile O0 := -O0 O2 := -O2 diff --git a/deps/Makefile b/deps/Makefile index 6ab1ac267..c7a9783f3 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -267,6 +267,8 @@ endif mariadb_client: mariadb-client-library/mariadb_client/libmariadb/libmariadbclient.a +# NOTE: When running Valgrind on ProxySQL, remove -DSQLITE_ENABLE_MEMORY_MANAGEMENT +# to avoid false positives in SQLite's internal memory allocator (pcache*, memjrnl*, etc.) sqlite3/sqlite3/sqlite3.o: cd sqlite3 && rm -rf sqlite-amalgamation-*/ || true cd sqlite3 && tar -zxf sqlite-amalgamation-*.tar.gz