Repository navigation
Prevent OverflowException in Expander.cs from crashing MSBuild - #2898
Conversation
|
Can you rebase on the |
Catch that and return null otherwise it crashes MSBuild. See dotnet#2882.
0e4c89c to
fed9eca
Compare
|
@AndyGerlicher @rainersigwald all green - can this go in? |
|
Added another commit that adds some more well-known functions to the fast path. This is needed so that Roslyn.sln evaluates cleanly without first-chance exceptions. Roslyn has added usage of these functions in this commit: |
|
Added another commit to account for this usage introduced by @rainersigwald just yesterday ;) |
|
This will go in tonight before I start the insertion build. It just has to stay green long enough to merge :) |
|
Cool. This seems to be the last one. Roslyn now evaluates without throwing. |
|
Yay! Thanks! I'm so happy this went in! |
| string trimChars; | ||
| if (TryGetArg(args, out trimChars) && trimChars.Length > 0) | ||
| { | ||
| returnVal = text.TrimStart(trimChars.ToCharArray()); |
There was a problem hiding this comment.
👍 I meant to check for this since I just added a use for this overload in common targets.
Convert.ChangeType can throw OverflowException.
Catch that and return null otherwise it crashes MSBuild.
See #2882.
This fixes the actual crash, but not the systemic issues uncovered by the crash. This is just to stop the bleeding. Proper fixes will follow.
This is an easy safe fix that I'd like to get into 15.6.