Page MenuHomeFreeBSD

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

Authored by afscoelho_gmail.com on Thu, Sep 3, 9:32 PM.
Tags
None
Referenced Files
F174022167: D59364.id188103.diff
Wed, Sep 30, 1:09 AM
Unknown Object (File)
Sun, Sep 27, 5:58 PM
Unknown Object (File)
Fri, Sep 25, 10:23 AM
Unknown Object (File)
Tue, Sep 22, 7:09 PM
Unknown Object (File)
Mon, Sep 21, 9:39 PM
Unknown Object (File)
Thu, Sep 17, 12:58 PM
Unknown Object (File)
Thu, Sep 17, 11:13 AM
Unknown Object (File)
Wed, Sep 16, 10:28 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 77479
Build 74362: arc lint + arc unit