HomeFreeBSD

libpmc: pmc_init() should avoid overflowing pmc_class_table

Description

libpmc: pmc_init() should avoid overflowing pmc_class_table

Use calloc().

Walk the class list we get from kernel, so we will not add something
the kernel does not know about.

Avoid picking headers from /usr/include.

Differential Revision: https://reviews.freebsd.org/D36401

Details

Provenance
tsoomeAuthored on Aug 31 2022, 8:09 AM
Differential Revision
D36401: libpmc: pmc_init() should avoid overflowing pmc_class_table
Parents
rG69413598d266: signal: use proc_iterate to save on work
Branches
Unknown
Tags
Unknown