-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Added null check before rendering a string from the terminal connection #14515
Conversation
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.
Yeah, that's fair. Thanks for the fix!
Hello @carlos-zamora! Because this pull request has the 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 (
|
@DHowett Could we get this ported to v1.15? Same as the other PR with the more robust 0x0 resizing check. |
Already in the servicing pipeline 😉 |
…on (#14515) Watson reports show that Visual Studio terminal attempts to render a string that is null causing the renderer to crash. More specifically, we see "NULL_POINTER_WRITE_c0000005_PublicTerminalCore.dll!TextBuffer::WriteLine" with the following stack: PublicTerminalCore!TextBuffer::WriteLine+0x1da PublicTerminalCore!TextBuffer::Write+0x191 PublicTerminalCore!Microsoft::Terminal::Core::Terminal::_WriteBuffer+0x1d3 PublicTerminalCore!Microsoft::Terminal::Core::Terminal::PrintString+0x9 PublicTerminalCore!TerminalDispatch::PrintString+0x22 PublicTerminalCore!Microsoft::Console::VirtualTerminal::OutputStateMachineEngine::ActionPrintString+0x42 PublicTerminalCore!Microsoft::Console::VirtualTerminal::StateMachine::ProcessString+0x123 PublicTerminalCore!TerminalSendOutput+0x68 Microsoft_DotNet_MSBuildSdkResolver!DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr, System.String)+0x8f Microsoft_Terminal_Wpf!Microsoft.Terminal.Wpf.TerminalContainer.Connection_TerminalOutput(System.Object, Microsoft.Terminal.Wpf.TerminalOutputEventArgs)+0x20 Microsoft_VisualStudio_Terminal_Implementation!Microsoft.VisualStudio.Terminal.TerminalWindowBase+<>c__DisplayClass59_0+<<BeginProcessingPtyData>b__0>d.MoveNext()+0x55f Internal bug: [Bug 1614709](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1614709): [Watson] crash64: NULL_POINTER_WRITE_c0000005_PublicTerminalCore.dll!TextBuffer::WriteLine Added a null check before PInvoking TerminalSendOutput. Validated locally that the check prevents null strings from rendering. (cherry picked from commit 79c47f6) Service-Card-Id: 87204854 Service-Version: 1.16
…on (#14515) Watson reports show that Visual Studio terminal attempts to render a string that is null causing the renderer to crash. More specifically, we see "NULL_POINTER_WRITE_c0000005_PublicTerminalCore.dll!TextBuffer::WriteLine" with the following stack: PublicTerminalCore!TextBuffer::WriteLine+0x1da PublicTerminalCore!TextBuffer::Write+0x191 PublicTerminalCore!Microsoft::Terminal::Core::Terminal::_WriteBuffer+0x1d3 PublicTerminalCore!Microsoft::Terminal::Core::Terminal::PrintString+0x9 PublicTerminalCore!TerminalDispatch::PrintString+0x22 PublicTerminalCore!Microsoft::Console::VirtualTerminal::OutputStateMachineEngine::ActionPrintString+0x42 PublicTerminalCore!Microsoft::Console::VirtualTerminal::StateMachine::ProcessString+0x123 PublicTerminalCore!TerminalSendOutput+0x68 Microsoft_DotNet_MSBuildSdkResolver!DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr, System.String)+0x8f Microsoft_Terminal_Wpf!Microsoft.Terminal.Wpf.TerminalContainer.Connection_TerminalOutput(System.Object, Microsoft.Terminal.Wpf.TerminalOutputEventArgs)+0x20 Microsoft_VisualStudio_Terminal_Implementation!Microsoft.VisualStudio.Terminal.TerminalWindowBase+<>c__DisplayClass59_0+<<BeginProcessingPtyData>b__0>d.MoveNext()+0x55f Internal bug: [Bug 1614709](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1614709): [Watson] crash64: NULL_POINTER_WRITE_c0000005_PublicTerminalCore.dll!TextBuffer::WriteLine Added a null check before PInvoking TerminalSendOutput. Validated locally that the check prevents null strings from rendering. (cherry picked from commit 79c47f6) Service-Card-Id: 87175193 Service-Version: 1.15
🎉 Handy links: |
🎉 Handy links: |
Summary of the Pull Request
Watson reports show that Visual Studio terminal attempts to render a string that is null causing the renderer to crash.
More specifically, we see "NULL_POINTER_WRITE_c0000005_PublicTerminalCore.dll!TextBuffer::WriteLine" with the following stack:
PublicTerminalCore!TextBuffer::WriteLine+0x1da
PublicTerminalCore!TextBuffer::Write+0x191
PublicTerminalCore!Microsoft::Terminal::Core::Terminal::_WriteBuffer+0x1d3
PublicTerminalCore!Microsoft::Terminal::Core::Terminal::PrintString+0x9
PublicTerminalCore!TerminalDispatch::PrintString+0x22
PublicTerminalCore!Microsoft::Console::VirtualTerminal::OutputStateMachineEngine::ActionPrintString+0x42
PublicTerminalCore!Microsoft::Console::VirtualTerminal::StateMachine::ProcessString+0x123
PublicTerminalCore!TerminalSendOutput+0x68
Microsoft_DotNet_MSBuildSdkResolver!DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr, System.String)+0x8f
Microsoft_Terminal_Wpf!Microsoft.Terminal.Wpf.TerminalContainer.Connection_TerminalOutput(System.Object, Microsoft.Terminal.Wpf.TerminalOutputEventArgs)+0x20
Microsoft_VisualStudio_Terminal_Implementation!Microsoft.VisualStudio.Terminal.TerminalWindowBase+<>c__DisplayClass59_0+<b__0>d.MoveNext()+0x55f
References
Internal bug: Bug 1614709: [Watson] crash64: NULL_POINTER_WRITE_c0000005_PublicTerminalCore.dll!TextBuffer::WriteLine
Detailed Description of the Pull Request / Additional comments
Added a null check before PInvoking TerminalSendOutput.
Validation Steps Performed
Validated locally that the check prevents null strings from rendering.