-
Bug
-
Resolution: Fixed
-
P3
-
11, 12, 13, 14, 15, 16
-
b22
-
x86
-
generic
VM_Version_Ext::max_qualified_cpu_freq_from_brand_string() attempts to extract and return the CPU frequency, by inspecting the CPU brand string (as per the document "Intel® Processor Identification and the CPUID Instruction. Application note 845 May 2012").
There is a bug with the current implementation, because it is naive in using the following construct:
const char* Hz_location = strchr(brand_string, 'H');
This likely works for most CPU models / brands, but not when the brand string is of the following form (for example):
"Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz"
The 'H' in "9850H" will be matched, but since there is no 'z' in the next position, the code will fall through and report a frequency of 0.
There is a bug with the current implementation, because it is naive in using the following construct:
const char* Hz_location = strchr(brand_string, 'H');
This likely works for most CPU models / brands, but not when the brand string is of the following form (for example):
"Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz"
The 'H' in "9850H" will be matched, but since there is no 'z' in the next position, the code will fall through and report a frequency of 0.