Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminal: PageList.reset has to zero arena memory to avoid reuse #2878

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

mitchellh
Copy link
Contributor

Fixes #2877

As the comment in the diff states, we rely on mmap to zero our memory. When we reset we are reusing previously allocated memory so we won't hit an mmap. We need to zero the memory ourselves.

This is pretty slow if there is a lot of memory but in every case except allocation failures, we expect there to be only a few pages allocated.

Fixes #2877

As the comment in the diff states, we rely on `mmap` to zero our memory.
When we reset we are reusing previously allocated memory so we won't hit
an `mmap`. We need to zero the memory ourselves.

This is pretty slow if there is a lot of memory but in every case except
allocation failures, we expect there to be only a few pages allocated.
@mitchellh mitchellh merged commit 50dc4b7 into main Dec 3, 2024
34 checks passed
@mitchellh mitchellh deleted the push-wopvxurkxzwk branch December 3, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OSC sequence overrides empty buffer
1 participant