This is an archive of the discontinued LLVM Phabricator instance.

[MSan] Make unaligned load/store functions compatible for both endians
ClosedPublic

Authored by mohit.bhakkad on Feb 18 2016, 1:34 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mohit.bhakkad retitled this revision from to [MSan] Make unaligned load functions compatible for both endians.
mohit.bhakkad updated this object.
mohit.bhakkad added reviewers: eugenis, samsonov, kcc.
mohit.bhakkad set the repository for this revision to rL LLVM.
mohit.bhakkad added subscribers: jaydeep, slthakur.
eugenis edited edge metadata.Feb 18 2016, 1:39 PM

This is not right, you can not read uu64 from uu16* in general.
The right way is to mirror what the instrumentation does, i.e.

*(uu16 *)&__msan_retval_tls = *(uu16 *)MEM_TO_SHADOW((uptr)p);
mohit.bhakkad retitled this revision from [MSan] Make unaligned load functions compatible for both endians to [MSan] Make unaligned load/store functions compatible for both endians.
mohit.bhakkad edited edge metadata.

Changed to suggested way, and adding store functions changes.

eugenis accepted this revision.Feb 19 2016, 11:16 AM
eugenis edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 19 2016, 11:16 AM
mohit.bhakkad added a subscriber: llvm-commits.
This revision was automatically updated to reflect the committed changes.