Skip to content

Comments

gh-145204: Fix LSan leak in test_initconfig_get_api#145206

Open
tzupingkao wants to merge 1 commit intopython:mainfrom
tp-side-project:fix-testembed-initconfig-leaks
Open

gh-145204: Fix LSan leak in test_initconfig_get_api#145206
tzupingkao wants to merge 1 commit intopython:mainfrom
tp-side-project:fix-testembed-initconfig-leaks

Conversation

@tzupingkao
Copy link

@tzupingkao tzupingkao commented Feb 25, 2026

Fix LeakSanitizer-reported leak in Programs/_testembed test_initconfig_get_api.

The test now frees the initial empty xoptions list returned by
PyInitConfig_GetStrList() and releases the PyInitConfig created by
PyInitConfig_Create().

Reproducer:
ASAN_OPTIONS=detect_leaks=1 ./Programs/_testembed test_initconfig_get_api

Tests:
./python -m test -j0 test_embed

@python-cla-bot
Copy link

python-cla-bot bot commented Feb 25, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Feb 25, 2026
@bedevere-app
Copy link

bedevere-app bot commented Feb 25, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@tzupingkao
Copy link
Author

This change only affects test code (_testembed) and has no user-visible impact.
I believe this can be marked as skip news.

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

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant