This is an archive of the discontinued LLVM Phabricator instance.

[MemoryLocation] Support memcpy_chk in getForArgument.
ClosedPublic

Authored by fhahn on Nov 23 2022, 2:36 PM.

Details

Summary

Similar to 9f9e8ba114ce, add support for memcyp_chk to
MemoryLocation::getForArgument.

The size argument for memcpy_chk is an upper bound for the size of the
pointer argument. memcpy_chk may read/write less than the specified length,
if it exceeds the specified max size and aborts.

Diff Detail

Event Timeline

fhahn created this revision.Nov 23 2022, 2:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 2:36 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
fhahn requested review of this revision.Nov 23 2022, 2:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 2:36 PM
This revision is now accepted and ready to land.Nov 23 2022, 2:38 PM
xbolva00 accepted this revision.Nov 23 2022, 2:49 PM
xbolva00 added inline comments.
llvm/lib/Analysis/MemoryLocation.cpp
263–264

Generalize

This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.Nov 24 2022, 2:07 PM
fhahn added inline comments.
llvm/lib/Analysis/MemoryLocation.cpp
263–264

Thanks, adjusted in the committed version.