Automated code review of src/subgraph/ by Gemini for potential bugs#9726
Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
Open
Automated code review of src/subgraph/ by Gemini for potential bugs#9726copybara-service[bot] wants to merge 1 commit intomasterfrom
copybara-service[bot] wants to merge 1 commit intomasterfrom
Conversation
846ef85 to
4ee4281
Compare
The fixes are from a few basic categories: - Lack of validation of input tensor rank before using the shape. This is tricky because the tensor shape and rank are not expected to be defined, but we sometimes use these shapes anyways before a reshaping happens. - We mix up input `input1` and `input2` in a lot of places, in ways that expose invalid memory accesses. - We mix up `filter_id` and `bias_id` often. Sometimes only for logging/error reporting, but sometimes not... - Sometimes we check something is valid, but not before using it first. - Ignoring the return value of validation functions. It makes one questionable change: when a loop has an unsigned extent, it wants to use an unsigned index. This is a questionable choice, there are arguments both ways on this one. PiperOrigin-RevId: 885703148
4ee4281 to
81c9b68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated code review of src/subgraph/ by Gemini for potential bugs
The fixes are from a few basic categories:
input1andinput2in a lot of places, in ways that expose invalid memory accesses.filter_idandbias_idoften. Sometimes only for logging/error reporting, but sometimes not...It makes one questionable change: when a loop has an unsigned extent, it wants to use an unsigned index. This is a questionable choice, there are arguments both ways on this one.