TextBuffer::ResizeTraditional may leak stale pointers #14696
Labels
Area-Output
Related to output processing (inserting text into buffer, retrieving buffer text, etc.)
In-PR
This issue has a related PR
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Needs-Tag-Fix
Doesn't match tag requirements
Priority-3
A description (P3)
Product-Conhost
For issues in the Console codebase
Product-Terminal
The new Windows Terminal.
Milestone
The catch clause will allow
BufferAllocator
to be destroyed while theROW
s in_storage
continue to reference its memory. The solution is to refactorROW::Resize
from being a mutating function over to allocating a new_storage
vector and copying all rows over. That way theTextBuffer
is only mutated once at the end, long after all throwing code has finished executing.The text was updated successfully, but these errors were encountered: