This is an archive of the discontinued LLVM Phabricator instance.

[NFC][AMDGPU] Default initialize the Subtarget
ClosedPublic

Authored by jchlanda on Jul 4 2023, 1:22 AM.

Details

Summary

This is to address a static analizer warning:

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.
In «unnamed> R600DAGToDAGISel.:R600DAGToDAGISel (llvm::TargetMachine &, livm::CodeGenOpt::Level): A pointer field is not initialized in the constructor (CWE-457)

Diff Detail

Event Timeline

jchlanda created this revision.Jul 4 2023, 1:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 1:22 AM
jchlanda requested review of this revision.Jul 4 2023, 1:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 1:22 AM
nickdesaulniers accepted this revision.Jul 7 2023, 1:31 PM

Thanks for the patch. Consider adding the output from the static analyzer to the commit description (in phab and git) for this patch and in the future.

This revision is now accepted and ready to land.Jul 7 2023, 1:31 PM
jchlanda edited the summary of this revision. (Show Details)Jul 17 2023, 2:17 AM

Thanks for the patch. Consider adding the output from the static analyzer to the commit description (in phab and git) for this patch and in the future.

Sure, updated the summary and will add it to the commit message. Thanks.

This revision was automatically updated to reflect the committed changes.