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
F174665058: D59364.id188466.diff
Mon, Oct 5, 1:31 AM
Unknown Object (File)
Sun, Oct 4, 3:30 AM
Unknown Object (File)
Sun, Oct 4, 1:23 AM
Unknown Object (File)
Sat, Oct 3, 5:59 AM
Unknown Object (File)
Sat, Oct 3, 5:20 AM
Unknown Object (File)
Sat, Oct 3, 4:22 AM
Unknown Object (File)
Sat, Oct 3, 3:39 AM
Unknown Object (File)
Sat, Oct 3, 3:37 AM
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 76458
Build 73341: arc lint + arc unit

Event Timeline

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