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
according to sys-utils/lscpu-cputype.c#L99, lscpu_cputype_get_default() can return a null pointer. However, with print_summary() having called this function in sys-utils/lscpu.c#L975 lscpu proceeds to dereference the return value (lines: 994, 1036 and 1038) without checking it for NULL first. This results in a segmentation fault when lscpu is run on a Linux/rv64 system. For more details on the segfault, see here: https://bugs.gentoo.org/802606#c8 .
Nb. as far as I can see every other time lscpu_cputype_get_default() is called (once more in lscpu.c, once in lscpu-virt.c, three times in lscpu-cputype.c) its return value is checked before dereferencing.
The text was updated successfully, but these errors were encountered:
Here you go! This is for a dual-core SiFive U74 (specifically from the prototype BeagleV Starlight board) but I expect it will look much the same on other U74 systems, HiFive Unmatched for instance. rv64-linux.tar.gz
according to sys-utils/lscpu-cputype.c#L99,
lscpu_cputype_get_default()
can return a null pointer. However, withprint_summary()
having called this function in sys-utils/lscpu.c#L975lscpu
proceeds to dereference the return value (lines: 994, 1036 and 1038) without checking it for NULL first. This results in a segmentation fault whenlscpu
is run on a Linux/rv64 system. For more details on the segfault, see here: https://bugs.gentoo.org/802606#c8 .Nb. as far as I can see every other time
lscpu_cputype_get_default()
is called (once more inlscpu.c
, once inlscpu-virt.c
, three times inlscpu-cputype.c
) its return value is checked before dereferencing.The text was updated successfully, but these errors were encountered: