Message393916
When subwin() is used to create a subwindow for an original window, it does not keep a reference to the original window object. This can result in the original window getting deleted with delwin() before the subwindow.
According to the X/Open curses specification[0]:
> The application must delete subwindows before deleting the main window.
This is also mentioned in the ncurses documentation[1]:
> Subwindows must be deleted before the main window can be deleted.
When building the Python curses module against NetBSD's curses implementation, deleting the windows in the wrong order causes a double-free. This results in hanging or crashing when running test_curses.
To fix this, window objects for subwindows should keep a reference to the original window object.
[0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/delwin.html
[1] https://invisible-island.net/ncurses/man/curs_window.3x.html |
|
Date |
User |
Action |
Args |
2021-05-19 02:08:10 | michaelforney | set | recipients:
+ michaelforney |
2021-05-19 02:08:10 | michaelforney | set | messageid: <1621390090.86.0.52375337548.issue44172@roundup.psfhosted.org> |
2021-05-19 02:08:10 | michaelforney | link | issue44172 messages |
2021-05-19 02:08:09 | michaelforney | create | |
|