Repository navigation
Conversation
| if ((uint)_currentOffset < (uint)_basicBlocks.Length) | ||
| CreateBasicBlock(_currentOffset); |
There was a problem hiding this comment.
Do we need a check like this for the other cases in this method (e.g. the non-_s variant of these instructions)?
| if (_currentOffset < _basicBlocks.Length && _currentOffset + delta < _basicBlocks.Length) | ||
| { | ||
| ImportBranch(opCode + (ILOpcode.br - ILOpcode.br_s), | ||
| _basicBlocks[_currentOffset + delta], (opCode != ILOpcode.br_s) ? _basicBlocks[_currentOffset] : null); | ||
| } |
There was a problem hiding this comment.
Would the new if check ever be false given we'd abort for this in FindJumpTargets already?
There was a problem hiding this comment.
We don't abort at ReportFallthroughAtEndOfMethod. At least that was the one case of usage case, and I do not know the codebase that well to think about is this abort is reasonable way to handle.
There was a problem hiding this comment.
We may want to abort at ReportFallthroughAtEndOfMethod to keep things simple.
| int delta = (sbyte)ReadILByte(); | ||
| ImportBranch(opCode + (ILOpcode.br - ILOpcode.br_s), | ||
| _basicBlocks[_currentOffset + delta], (opCode != ILOpcode.br_s) ? _basicBlocks[_currentOffset] : null); | ||
| if (_currentOffset < _basicBlocks.Length && _currentOffset + delta < _basicBlocks.Length) |
There was a problem hiding this comment.
It does not look right to ignore the invalid code silently.
| if ((uint)_currentOffset < (uint)_basicBlocks.Length) | ||
| CreateBasicBlock(_currentOffset); | ||
| else | ||
| { |
There was a problem hiding this comment.
Formatting: If one side of if-else has curly braces, the other side should have them too.
|
@kant2002, just checking if you plan to get back to this PR anytime soon. |
|
This pull request has been automatically marked |
|
This pull request will now be closed since it had been marked |
Closes #63227