[llvm-branch-commits] [compiler-rt-branch] r270396 - Merging r261513:
Mohit K. Bhakkad via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun May 22 23:58:48 PDT 2016
Author: mohit.bhakkad
Date: Mon May 23 01:55:35 2016
New Revision: 270396
URL: http://llvm.org/viewvc/llvm-project?rev=270396&view=rev
Log:
Merging r261513:
------------------------------------------------------------------------
r261513 | mohit.bhakkad | 2016-02-22 11:46:28 +0530 (Mon, 22 Feb 2016) | 7 lines
[MSan] Make unaligned load/store functions compatible for both endians
Reviewers: eugenis
Subscribers: jaydeep, sagar, llvm-commits
Differential Revision: http://reviews.llvm.org/D17371
------------------------------------------------------------------------
Modified:
compiler-rt/branches/release_38/ (props changed)
compiler-rt/branches/release_38/lib/msan/msan.cc
Propchange: compiler-rt/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 01:55:35 2016
@@ -1 +1 @@
-/compiler-rt/trunk:258916,259755,260669,260839,260946,261073,261142,261148,261193,261263
+/compiler-rt/trunk:258916,259755,260669,260839,260946,261073,261142,261148,261193,261263,261513
Modified: compiler-rt/branches/release_38/lib/msan/msan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_38/lib/msan/msan.cc?rev=270396&r1=270395&r2=270396&view=diff
==============================================================================
--- compiler-rt/branches/release_38/lib/msan/msan.cc (original)
+++ compiler-rt/branches/release_38/lib/msan/msan.cc Mon May 23 01:55:35 2016
@@ -580,13 +580,13 @@ u32 __msan_get_umr_origin() {
}
u16 __sanitizer_unaligned_load16(const uu16 *p) {
- __msan_retval_tls[0] = *(uu16 *)MEM_TO_SHADOW((uptr)p);
+ *(uu16 *)&__msan_retval_tls[0] = *(uu16 *)MEM_TO_SHADOW((uptr)p);
if (__msan_get_track_origins())
__msan_retval_origin_tls = GetOriginIfPoisoned((uptr)p, sizeof(*p));
return *p;
}
u32 __sanitizer_unaligned_load32(const uu32 *p) {
- __msan_retval_tls[0] = *(uu32 *)MEM_TO_SHADOW((uptr)p);
+ *(uu32 *)&__msan_retval_tls[0] = *(uu32 *)MEM_TO_SHADOW((uptr)p);
if (__msan_get_track_origins())
__msan_retval_origin_tls = GetOriginIfPoisoned((uptr)p, sizeof(*p));
return *p;
@@ -598,7 +598,7 @@ u64 __sanitizer_unaligned_load64(const u
return *p;
}
void __sanitizer_unaligned_store16(uu16 *p, u16 x) {
- u16 s = __msan_param_tls[1];
+ u16 s = *(uu16 *)&__msan_param_tls[1];
*(uu16 *)MEM_TO_SHADOW((uptr)p) = s;
if (s && __msan_get_track_origins())
if (uu32 o = __msan_param_origin_tls[2])
@@ -606,7 +606,7 @@ void __sanitizer_unaligned_store16(uu16
*p = x;
}
void __sanitizer_unaligned_store32(uu32 *p, u32 x) {
- u32 s = __msan_param_tls[1];
+ u32 s = *(uu32 *)&__msan_param_tls[1];
*(uu32 *)MEM_TO_SHADOW((uptr)p) = s;
if (s && __msan_get_track_origins())
if (uu32 o = __msan_param_origin_tls[2])
More information about the llvm-branch-commits
mailing list