This is with ncurses 6.0. When running the test suite with: ./python -bb -E -Wd -m test -r -w -uall test_curses fails as reported in issue 27323 and when the test runner re-runs test_curses in verbose mode at the end to test for a transient error, it happens sometimes that test_curses crashes. See the gdb backtrace attached.