This is an archive of the discontinued LLVM Phabricator instance.

[ASAN] Support memory checks on experimental.vp.strided.load/store.
ClosedPublic

Authored by fakepaper56 on Apr 24 2023, 9:11 AM.

Details

Summary

The patch adds new member MaybeStride into InterestingMemoryOperand to represent
the stride value of experimental.vp.strided.load/store.

Diff Detail

Event Timeline

fakepaper56 created this revision.Apr 24 2023, 9:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2023, 9:11 AM
fakepaper56 requested review of this revision.Apr 24 2023, 9:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2023, 9:11 AM
fakepaper56 planned changes to this revision.May 3 2023, 12:40 AM

Rebase and refine the code.

Rebase and refine code.

reames requested changes to this revision.May 8 2023, 8:43 AM
This revision now requires changes to proceed.May 8 2023, 8:43 AM

@reames what changes are you requesting? I don't see any other comments.

@craig.topper Thanks, does this one come through? I definitely wrote and saved a comment last time.

llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
1367

This alignment check is overly conservative for constant stride which is a multiple of the alignment.

Organizationally, this should probably be inside the instrumentation logic. The alignment here appears to be the base alignment, and the element alignment can be computed from it and the stride as needed.

Consider the stride value is a multiple of pointer alignment. And sorry that I
am late to update to the revision. I missed those new comments.

fakepaper56 marked an inline comment as done.May 16 2023, 6:15 PM
fakepaper56 added inline comments.
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
1367

Good point. I had fixed the issue in the latest revision.

reames accepted this revision.May 18 2023, 2:42 PM

LGTM

This revision is now accepted and ready to land.May 18 2023, 2:42 PM
This revision was automatically updated to reflect the committed changes.
fakepaper56 marked an inline comment as done.