sysutils/turbostat: unbreak runtime on FreeBSD >= 13.1
$ turbostat
turbostat version 17.06.23 - Len Brown <lenb@kernel.org>
Segmentation fault
- thread #1, name = 'turbostat', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) frame #0: 0x0000000000216992 turbostat`topology_probe at turbostat.c:4685:7 4682 * Validate that all cpus in cpu_subset are also in cpu_present_set 4683 */ 4684 for (i = 0; i < CPU_SUBSET_MAXCPUS; ++i) {
-> 4685 if (CPU_ISSET_S(i, cpu_subset_size, cpu_subset))
4686 if (!CPU_ISSET_S(i, cpu_present_setsize, cpu_present_set)) 4687 err(1, "cpu%d not present", i); 4688 }
(lldb) bt
- thread #1, name = 'turbostat', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
- frame #0: 0x0000000000216992 turbostat`topology_probe at turbostat.c:4685:7 frame #1: 0x00000000002111c9 turbostat`setup_all_buffers at turbostat.c:4853:2 frame #2: 0x0000000000217909 turbostat`turbostat_init at turbostat.c:4888:2 frame #3: 0x0000000000218f3f turbostat`main(argc=1, argv=0x0000000820444710) at turbostat.c:5447:2 frame #4: 0x0000000000207160 turbostat`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:73:7
(lldb) p cpu_subset
(cpu_set_t *) $0 = NULL
PR: 262866