prometheus / prometheus/procfs
TestProcStatLimits: Int overflow on 32 bits arches
Open
Nobody has claimed this yet.
bug
help wanted
- Dominant language
- Go
- Stars
- 883
- Forks
- 388
- Avg merge
- 13h 28m
- Merged PRs (30d)
- 3
Description
On both i686 and armv7hl, TestProcStatLimits overflows:
# github.com/prometheus/procfs [github.com/prometheus/procfs.test]
./proc_stat_test.go:97:49: cannot use math.MinInt64 (untyped int constant -9223372036854775808) as int value in struct literal (overflows)
./proc_stat_test.go:98:51: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in struct literal (overflows)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in proc_stat_test.go at lines 97-98 and inspect TestProcStatLimits, then run the relevant Go tests on a 32-bit architecture such as i686 or armv7hl. Done means the test compiles without integer overflow errors and passes on those architectures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100