Skip to content

Add Valgrind testing infrastructure for memory bug detection#899

Open
shivampr wants to merge 1 commit into
duckdb:mainfrom
shivampr:add-valgrind-testing
Open

Add Valgrind testing infrastructure for memory bug detection#899
shivampr wants to merge 1 commit into
duckdb:mainfrom
shivampr:add-valgrind-testing

Conversation

@shivampr
Copy link
Copy Markdown
Contributor

Task

Added Valgrind testing infrastructure to detect memory bugs. The changes include :

  • Automated Valgrind testing script
  • Makefile target for easy usage
  • Minimal regression test

How I Tested

Script argument validation, error handling, formatting compliance, and regression test execution (56/57 tests pass, 1 pre-existing failure) using make valgrind-check, ./scripts/valgrind_pgduckdb.sh, and make check-regression-duckdb. Identified potential memory leak in src/pgduckdb_detoast.cpp lines 130-140 where exception could prevent duckdb_free(result) from executing.

Fixes #218

Add script, Makefile target, and test case for memory bug detection.
Usage: make valgrind-check PG_SRC=/path/to/postgres
@shivampr
Copy link
Copy Markdown
Contributor Author

shivampr commented Aug 25, 2025

@JelteF Can you help in reviewing this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Valgrind testing

1 participant