github-vet / github-vet/rangeloop-pointer-findings
dnanexus/dxfuse: sync_db_dx.go; 10 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [dnanexus/dxfuse](https://www.github.com/dnanexus/dxfuse) at [sync_db_dx.go](https://github.com/dnanexus/dxfuse/blob/f254ec25b8c44c3da5915e0b0ec87beb1f38fb52/sync_db_dx.go#L476-L485)
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 fsValue is reassigned at line 480
[Click here to see the code in its original context.](https://github.com/dnanexus/dxfuse/blob/f254ec25b8c44c3da5915e0b0ec87beb1f38fb52/sync_db_dx.go#L476-L485)
Click here to show the 10 line(s) of Go which triggered the analyzer.
```go
for key, fsValue := range(fsProps) {
_, ok := dnaxProps[key]
if !ok {
// a new property
opProps[key] = &fsValue
} else {
// existing property, we already checked that case;
// if the value changed, we set it in the map
}
}
```
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: f254ec25b8c44c3da5915e0b0ec87beb1f38fb52
Contributor guide
No contributing guide indexed for this repository
Research direction
Read sync_db_dx.go at lines 476-485 and inspect the surrounding dxfuse code, then compare the analyzer warning with Go range-loop behavior. Done means deciding whether the finding is a Bug, Mitigated, or Desirable Behavior and leaving the corresponding reaction on the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100