github-vet / github-vet/rangeloop-pointer-findings
chaors/TTC_read: gttc/consensus/alien/snapshot.go; 5 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [chaors/TTC_read](https://www.github.com/chaors/TTC_read) at [gttc/consensus/alien/snapshot.go](https://github.com/chaors/TTC_read/blob/80eb0f14cade0d8e041824520b433ac658922c45/gttc/consensus/alien/snapshot.go#L673-L677)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to proposal is reassigned at line 676
[Click here to see the code in its original context.](https://github.com/chaors/TTC_read/blob/80eb0f14cade0d8e041824520b433ac658922c45/gttc/consensus/alien/snapshot.go#L673-L677)
Click here to show the 5 line(s) of Go which triggered the analyzer.
```go
for _, proposal := range proposals {
fmt.Printf("ccc updateSnapshotByProposals...\n")
proposal.ReceivedNumber = new(big.Int).Set(headerNumber)
s.Proposals[proposal.Hash] = &proposal
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 80eb0f14cade0d8e041824520b433ac658922c45
Contributor guide
No contributing guide indexed for this repository
Research direction
Open gttc/consensus/alien/snapshot.go at lines 673-677 and inspect the surrounding updateSnapshotByProposals logic. Review the analyzer's report about the range-loop variable, then classify the finding as Bug, Mitigated, or Desirable Behavior and leave the corresponding reaction on the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100