Add notes about Valgrind and SQLite memory management

Add comments to Makefile and deps/Makefile explaining that SQLite's
internal memory allocator (enabled by SQLITE_ENABLE_MEMORY_MANAGEMENT)
can cause false positives in Valgrind. To avoid this when running
Valgrind, rebuild SQLite without this flag.
pull/5374/head
Rene Cannao 3 months ago
parent 4e39297ef9
commit 2af3b0d333

@ -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

2
deps/Makefile vendored

@ -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

Loading…
Cancel
Save