From e80219afcf6a9aedf8ea5997b2474d14a87d92c8 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 4 Jun 2026 15:31:31 -0700 Subject: [PATCH 1/2] Only show definite leaks to reduce the number of suppressions we need to save. When running Python with valgrind, PYTHONMALLOC=malloc, and the default suppressions file in python/cpython, most of the false positive leaks are possibly lost and a few are reachable. I believe memory leaks are more likely to happen in the Python client with definitely lost leaks; I don't think the client moves the pointer to heap allocated memory that much, which would lead to possibly lost leaks. Also I don't believe reachable leaks would usually lead to an out of memory error. --- .github/workflows/test-artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-artifact.yml b/.github/workflows/test-artifact.yml index c66d58ad64..1c62b05212 100644 --- a/.github/workflows/test-artifact.yml +++ b/.github/workflows/test-artifact.yml @@ -200,7 +200,7 @@ jobs: wget -P test "https://raw.githubusercontent.com/python/cpython/$PYTHON_VERSION/Misc/$VALGRIND_SUPP_FILE" # sed -i "127,185s/###//" "$VALGRIND_SUPP_FILE" - echo VALGRIND_ARGS="$VALGRIND_ARGS --suppressions=./$VALGRIND_SUPP_FILE --leak-check=full --errors-for-leak-kinds=none" >> "$GITHUB_ENV" + echo VALGRIND_ARGS="$VALGRIND_ARGS --suppressions=./$VALGRIND_SUPP_FILE --show-leak-kinds=definite --leak-check=full --errors-for-leak-kinds=none" >> "$GITHUB_ENV" fi fi env: From 9a0ec453d06fc1b8d3143f9038b85a7bf204e9d5 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 5 Jun 2026 07:48:02 -0700 Subject: [PATCH 2/2] Generate suppressions so it's easier to append to the existing valgrind suppressions file in this repo --- .github/workflows/test-artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-artifact.yml b/.github/workflows/test-artifact.yml index 1c62b05212..228d945eaa 100644 --- a/.github/workflows/test-artifact.yml +++ b/.github/workflows/test-artifact.yml @@ -200,7 +200,7 @@ jobs: wget -P test "https://raw.githubusercontent.com/python/cpython/$PYTHON_VERSION/Misc/$VALGRIND_SUPP_FILE" # sed -i "127,185s/###//" "$VALGRIND_SUPP_FILE" - echo VALGRIND_ARGS="$VALGRIND_ARGS --suppressions=./$VALGRIND_SUPP_FILE --show-leak-kinds=definite --leak-check=full --errors-for-leak-kinds=none" >> "$GITHUB_ENV" + echo VALGRIND_ARGS="$VALGRIND_ARGS --gen-suppressions=all --suppressions=./$VALGRIND_SUPP_FILE --show-leak-kinds=definite --leak-check=full --errors-for-leak-kinds=none" >> "$GITHUB_ENV" fi fi env: