libvterm segfaults on window resize
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvterm |
New
|
Undecided
|
Unassigned |
Bug Description
I'm running libvterm with a screen callback on damage that reads the damaged rectangle into a buffer. When the screen is resized from tall and skinny to wide and short (e.g. 100 rows x 50 cols to 50 rows x 100 cols), I get a segfault, that seems to come from trying to access a null cell on screen.c:700 (https:/
Unfortunately, there is no way to identify that the size of the screen has already decreased before this damage because the number of new rows and columns are updated on the screen object after the realloc, but not on the VTerm object (which is the only place get_size is exposed)
It would be nice to either have a way to tell that the screen is smaller when this damagerect occurs or change the ordering of/logic of the realloc + damaging that occurs during a screen resizing to accommodate this resize.
description: | updated |
See minimal breaking example here: https:/ /github. com/sullivan- sean/vterm_ resize