-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix a crash when calling SetConsoleScreenBufferSize in conpty #4021
Conversation
Hello @zadjii-msft! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 7 hours 15 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the tiny repro program into the tests?
…onpty-explodes-often
@miniksa So, that's unfortunately not as easy as I'd hope. This crash only repros because when you make the above API call in conpty, the conpty crashes when the renderer thread comes back around to try and paint the frame. With our current tests, it's pretty hard to test the whole stack simultaneously in conpty mode - those unittests are usually focused on one individual piece. What this really needs is the ability to run most of our feature tests within the context of a conpty session, in addition to a normal conhost session. It's the work of #3941 to modify the feature tests to support that. I suppose I could add that test case to the feature tests now, though it'd always pass, and I don't know if I'd be able to make sure that test would fail in conpty mode... I think it'd be cleaner if we just made sure #3941 also tested this bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK fine.
🎉 Handy links: |
Summary of the Pull Request
Fixes the bug @DHowett-MSFT found in conpty. Before conpty, this check was all one statement. With the addition of conpty, that statement was moved into a "am I not headless" check, to not restrict the conpty size based on the window size. However, the "is the user trying to resize the buffer smaller than the viewport" should have been done outside the headless check. This just splits that statement up.
PR Checklist
Validation Steps Performed
Ran the tiny repro program Dustin provided - we no longer crash.