This is an archive of the discontinued LLVM Phabricator instance.

Initialize ExtAddrMode::Scale
ClosedPublic

Authored by vitalybuka on Jan 7 2022, 11:02 AM.

Details

Summary

Detected by msan with:
-Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1

Diff Detail

Event Timeline

vitalybuka created this revision.Jan 7 2022, 11:02 AM
vitalybuka requested review of this revision.Jan 7 2022, 11:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2022, 11:02 AM
kda accepted this revision.Jan 7 2022, 2:36 PM

I wonder if this should be placed in the struct as a default initializer. (TargetInstrInfo.h)
Short term, I think you work is right and matches the spirit of existing code.
But it seems like a vulnerability if anyone else were to use the struct and not initialize all members.

This revision is now accepted and ready to land.Jan 7 2022, 2:36 PM
This revision was automatically updated to reflect the committed changes.