Title: curses segfault resizing window
Type: crash Stage:
Components: Extension Modules Versions: Python 3.6, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Josiah Ulfers, lisroach, twouters
Priority: normal Keywords:

Created on 2019-02-07 00:02 by Josiah Ulfers, last changed 2019-03-12 04:06 by lisroach.

File name Uploaded Description Edit Josiah Ulfers, 2019-02-07 00:02
Messages (2)
msg334991 - (view) Author: Josiah Ulfers (Josiah Ulfers) Date: 2019-02-07 00:02
To provoke a segmentation fault, run the attached, then grab the top or
bottom edge of the window. Move it down or up until it overlaps the box.
Might need to wiggle the edge a little, but it's reliably reproducible.

Expected error, which is what happens when dragging the left or right edge
instead of the top or bottom:

    Traceback (most recent call last):
      File "", line 12, in <module>
      File "/usr/lib64/python3.6/curses/", line 94, in wrapper
        return func(stdscr, *args, **kwds)
      File "", line 9, in main
        w.addstr(0, 0, box)
    _curses.error: addwstr() returned ERR

Actual error message varies a little. It's either:

    *** Error in `python3': corrupted size vs. prev_size: 0x000055b3055ba820 ***
        Aborted (core dumped)


    *** Error in `python3': double free or corruption (!prev): 0x000055b61e1ffbb0 ***
        Aborted (core dumped)


    *** Error in `python': malloc(): memory corruption: 0x0000564907a5a4f0 ***
        Aborted (core dumped)

Possibly relates to issue15581


Python 2.7.14 and 3.6.5
OpenSUSE 15.0
KDE Plasma 5.12.6

uname -a
Linux ... 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux
msg337718 - (view) Author: Lisa Roach (lisroach) * (Python committer) Date: 2019-03-12 04:06
I am able to confirm the repro, I haven't been able to find the root cause of it yet though. Trying to dig into it.
Date User Action Args
2019-03-12 04:06:32lisroachsetnosy: + lisroach
messages: + msg337718
2019-02-10 08:49:07SilentGhostsetnosy: + twouters
2019-02-07 00:02:21Josiah Ulferscreate