Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test_curses reference leak in the Python main branch #94644

Closed
Assignees
kumaraditya303
Labels
3.12only security fixestype-bugAn unexpected behavior, bug, or error
@vstinner

Description

@vstinner

At commite925241, test_curses leaks references:

$ ./python -m test test_curses -m test_output_string_embedded_null_chars -u all  -R 3:3(...)test_curses leaked [4, 4, 4] references, sum=12

I reproduce the issue on Fedora.

Example of failing buildbot:https://buildbot.python.org/all/#/builders/16/builds/244

Before this change, Python doesn't leak references.

Before: make:

gcc -fPIC -g -Og -Wall -O0 -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -DHAVE_NCURSESW=1 -I/usr/include/ncursesw -I./Include -I. -I/usr/local/include -I/home/vstinner/python/main/Include -I/home/vstinner/python/main -c /home/vstinner/python/main/Modules/_cursesmodule.c -o build/temp.linux-x86_64-3.12-pydebug/home/vstinner/python/main/Modules/_cursesmodule.ogcc -fPIC -g -Og -Wall -O0 -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -DHAVE_NCURSESW=1 -I/usr/include/ncursesw -I./Include -I. -I/usr/local/include -I/home/vstinner/python/main/Include -I/home/vstinner/python/main -c /home/vstinner/python/main/Modules/_curses_panel.c -o build/temp.linux-x86_64-3.12-pydebug/home/vstinner/python/main/Modules/_curses_panel.o

After: make:

gcc -fPIC -g -Og -Wall -O0 -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -D_DEFAULT_SOURCE -I./Include -I. -I/usr/local/include -I/home/vstinner/python/main/Include -I/home/vstinner/python/main -c /home/vstinner/python/main/Modules/_cursesmodule.c -o build/temp.linux-x86_64-3.12-pydebug/home/vstinner/python/main/Modules/_cursesmodule.ogcc -fPIC -g -Og -Wall -O0 -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -I./Include -I. -I/usr/local/include -I/home/vstinner/python/main/Include -I/home/vstinner/python/main -c /home/vstinner/python/main/Modules/_curses_panel.c -o build/temp.linux-x86_64-3.12-pydebug/home/vstinner/python/main/Modules/_curses_panel.o

The commit removes-DHAVE_NCURSESW=1 -I/usr/include/ncursesw options and adds -D_DEFAULT_SOURCE option to the (gcc) build command line of the _curses extension.

cc@tiran@erlend-aasland

Metadata

Metadata

Labels

3.12only security fixestype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp