You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cpuinfo_x86_init_processor - ‘brand_string’ of size 48 warning #343
In this PR #320
the size of CPUINFO_PACKAGE_NAME_MAX was increased from 48 to 64
But the linux x86 build shows some fields were not updated
[ 20%] Building C object CMakeFiles/cpuinfo.dir/src/x86/init.c.o
/usr/local/google/home/usr/git/cpuinfo/src/x86/init.c: In function ‘cpuinfo_x86_init_processor’:
/usr/local/google/home/usr/git/cpuinfo/src/x86/init.c:75:17: warning: ‘memcpy’ reading 64 bytes from a region of size 48 [-Wstringop-overread]
75 | memcpy(processor->brand_string, brand_string, sizeof(processor->brand_string));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/google/home/usr/git/cpuinfo/src/x86/init.c:71:35: note: source object ‘brand_string’ of size 48
71 | struct cpuid_regs brand_string[3];
| ^~~~~~~~~~~~
[ 25%] Building C object CMakeFiles/cpuinfo.dir/src/x86/info.c.o
Activity