Page MenuHomeFreeBSD

pmc(8): zero-initialize the event descriptor in stat mode
Needs ReviewPublic

Authored by afscoelho_gmail.com on Sep 3 2026, 9:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 16, 4:15 PM
Unknown Object (File)
Thu, Oct 15, 4:15 AM
Unknown Object (File)
Wed, Oct 14, 8:42 PM
Unknown Object (File)
Wed, Oct 14, 4:46 AM
Unknown Object (File)
Wed, Oct 14, 3:15 AM
Unknown Object (File)
Mon, Oct 12, 10:45 AM
Unknown Object (File)
Mon, Oct 12, 10:38 AM
Unknown Object (File)
Sun, Oct 11, 10:32 PM
Subscribers

Details

Summary

cmd_pmc_stat allocated the event descriptor with malloc and then set
only some of its fields, so the rest held whatever was on the heap.
Use calloc.

This is an independent fix. It does not depend on the PMU grouping
work, and can be committed on its own.

Sponsored by: AMD

Signed-off-by: Andre Silva <andasilv@amd.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 78176
Build 75059: arc lint + arc unit

Event Timeline

Rebase on main (D60141 and D60185 are committed). No change.