[SERVER-43257] Don't use sizeof to get size of valarray in GlobalLockServerStatusSection Created: 10/Sep/19 Updated: 29/Oct/23 Resolved: 11/Sep/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Execution Team 2019-09-23 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
This code incorrectly uses sizeof instead of size() to determine the number of elements in the valarray. sizeof returns the size of the type, not the number of elements. This does not, and has not caused any bugs, but should be fixed for clarity and correctness. |
| Comments |
| Comment by Githook User [ 11/Sep/19 ] |
|
Author: {'username': 'louiswilliams', 'email': 'louis.williams@mongodb.com', 'name': 'Louis Williams'}Message: |