Repository navigation
test_curses reference leak in the Python main branch #94644
Copy link
Copy link
Closed
Labels
3.12only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jul 7, 2022 HAVE_NCURSESWshould be added topyconfig.h. The pkg-config branch does not define the config value.The problem may have revealed an old bug in the non-wide curses build.
@kumaraditya303 fixed the reference leak when the curses module is built without
ncursesw. I addressed the missingHAVE_NCURSESWin the pkg-config branch. Additional defines and include directories are now coming from pkg-config or env var overrides.- added a commit that references this issue
on Jul 7, 2022 I addressed the missing HAVE_NCURSESW in the pkg-config branch.
What is this branch?
The TRUE branch in
PKG_CHECK_MODULEScall:PKG_CHECK_MODULES([CURSES], [ncursesw], [ AC_DEFINE([HAVE_NCURSESW], [1]) <<<<<<<<<<<<<<<<<<<< this line was missing have_curses=ncursesw ], [ WITH_SAVE_ENV([ AC_CHECK_LIB([ncursesw], [initscr], [ AC_DEFINE([HAVE_NCURSESW], [1]) have_curses=ncursesw CURSES_CFLAGS=${CURSES_CFLAGS-""} CURSES_LIBS=${CURSES_LIBS-"-lncursesw"} ]) ]) ])- added a commit that references this issue
on Jul 7, 2022 At commit b6558d7, the HAVE_NCURSESW macro is now defined as 1 in pyconfig.h:
/* Define to 1 if you have the `ncursesw' library. */ #define HAVE_NCURSESW 1Thanks for the fix.
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
At commit e925241, test_curses leaks references:
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:
After: make:
The commit removes
-DHAVE_NCURSESW=1 -I/usr/include/ncurseswoptions and adds-D_DEFAULT_SOURCEoption to the (gcc) build command line of the _curses extension.cc @tiran @erlend-aasland