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

[gk] Increase print buffer, add size check #3826

Merged
merged 1 commit into from
Jan 5, 2025
Merged

Conversation

water111
Copy link
Collaborator

@water111 water111 commented Jan 5, 2025

This should fix the crash when entering the freedom HQ elevator. It was caused by a large number of prints, one for each process in the city being killed by check-for-rougue-process, which would overflow the print buffer. So I increased the print buffer.

Detecting buffer overflow here is hard because lots of things are allowed to write to it, including the user's GOAL print methods. I added a basic check that will assert when there's 1k or less space in the buffer. It won't catch every overflow, but it would have caught this one.

@water111 water111 merged commit 79e4e36 into master Jan 5, 2025
12 checks passed
@water111 water111 deleted the w/print-buffer-overflow branch January 5, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant