This is an archive of the discontinued LLVM Phabricator instance.

[MSan] Move origins for overlapped memory transfer
ClosedPublic

Authored by stephan.yichao.zhao on Jan 12 2021, 5:39 PM.

Diff Detail

Event Timeline

stephan.yichao.zhao requested review of this revision.Jan 12 2021, 5:39 PM
stephan.yichao.zhao created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2021, 5:39 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
stephan.yichao.zhao edited the summary of this revision. (Show Details)Jan 12 2021, 11:05 PM
stephan.yichao.zhao edited the summary of this revision. (Show Details)

update

stephan.yichao.zhao edited the summary of this revision. (Show Details)Jan 13 2021, 11:44 AM

updated line check after clang reformatted test files.

compiler-rt/lib/msan/msan_poisoning.cpp
131

I think this loop does one extra iteration (compared to the one in CopyOrigin) because it starts at src_end instead of src_end - 1.

157

You can just call it "MoveOrigin", same as memmove is a generalization of memcpy.

fixed the incorrect interation number.

Also removed that if (end < begin) check, end >= begin after the change.

renamed CopyOrMoveOrigin to MoveOrigin

stephan.yichao.zhao marked 2 inline comments as done.Jan 14 2021, 1:50 PM
stephan.yichao.zhao added inline comments.
compiler-rt/lib/msan/msan_poisoning.cpp
131

Thank you for catching this. Fixed.

eugenis accepted this revision.Jan 20 2021, 2:26 PM

LGTM

This revision is now accepted and ready to land.Jan 20 2021, 2:26 PM
This revision was landed with ongoing or failed builds.Jan 20 2021, 6:13 PM
This revision was automatically updated to reflect the committed changes.