Overflow corrected
- Dominant language
- C
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
if (old_val_CORE[ii] > new_val_CORE[ii]) { //handle overflow
CPU_CLK_UNHALTED_CORE = (UINT64_MAX - old_val_CORE[ii]) + new_val_CORE[ii];
may be corrected by
if (old_val_CORE[ii] > new_val_CORE[ii]) { //handle overflow
CPU_CLK_UNHALTED_CORE = (UINT64_MAX - new_val_CORE[ii]) + old_val_CORE[ii];
I'm programming XFreq and this is the formula which gives me good results when
showing Turbo.
blog.cyring.fr
```
Original issue reported on code.google.com by `cyril.in...@gmail.com` on 17 Feb 2014 at 6:02
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the repository for old_val_CORE and inspect the surrounding overflow-handling code. Compare the current calculation with the issue's proposed formula and check how the resulting counter is used for Turbo or XFreq display. Done means the overflow behavior matches the reported expected results and the relevant code still builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100