Details
-
Bug
-
Resolution: Fixed
-
Major
-
master
-
None
-
Untriaged
-
1
-
Unknown
Description
New failure seen on CV for a number of patches
Undefined Sanitizer: conf...../kv_engine/engines/ep/src/vb_count_visitor.h:97:42: runtime error: 1.84467e+21 is outside the range of representable values of type 'unsigned long'
Looking at the code and error
size_t getMemResidentPer() {
|
size_t numResident = numItems - nonResident;
|
return (numItems != 0) ? (size_t)(numResident * 100.0) / (numItems)
|
: 100;
|
}
|
I think it's this expression triggering the problem - (size_t)(numResident * 100.0) which suggests numResident is already very large before being multiplied as a float type and casted back to size_t?