[llvm-branch-commits] [llvm-branch] r228445 - Merging r228444:
Hans Wennborg
hans at hanshq.net
Fri Feb 6 14:06:43 PST 2015
Author: hans
Date: Fri Feb 6 16:06:43 2015
New Revision: 228445
URL: http://llvm.org/viewvc/llvm-project?rev=228445&view=rev
Log:
Merging r228444:
------------------------------------------------------------------------
r228444 | eugenis | 2015-02-06 13:47:39 -0800 (Fri, 06 Feb 2015) | 8 lines
[msan] Fix "missing origin" in atomic store.
An atomic store always make the target location fully initialized (in the
current implementation). It should not store origin. Initialized memory can't
have meaningful origin, and, due to origin granularity (4 bytes) there is a
chance that this extra store would overwrite meaningfull origin for an adjacent
location.
------------------------------------------------------------------------
Modified:
llvm/branches/release_36/ (props changed)
llvm/branches/release_36/lib/Transforms/Instrumentation/MemorySanitizer.cpp
llvm/branches/release_36/test/Instrumentation/MemorySanitizer/atomics.ll
Propchange: llvm/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 6 16:06:43 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331
+/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228444
Modified: llvm/branches/release_36/lib/Transforms/Instrumentation/MemorySanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Transforms/Instrumentation/MemorySanitizer.cpp?rev=228445&r1=228444&r2=228445&view=diff
==============================================================================
--- llvm/branches/release_36/lib/Transforms/Instrumentation/MemorySanitizer.cpp (original)
+++ llvm/branches/release_36/lib/Transforms/Instrumentation/MemorySanitizer.cpp Fri Feb 6 16:06:43 2015
@@ -631,7 +631,7 @@ struct MemorySanitizerVisitor : public I
if (SI.isAtomic()) SI.setOrdering(addReleaseOrdering(SI.getOrdering()));
- if (MS.TrackOrigins)
+ if (MS.TrackOrigins && !SI.isAtomic())
storeOrigin(IRB, Addr, Shadow, getOrigin(Val), SI.getAlignment(),
InstrumentWithCalls);
}
Modified: llvm/branches/release_36/test/Instrumentation/MemorySanitizer/atomics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/Instrumentation/MemorySanitizer/atomics.ll?rev=228445&r1=228444&r2=228445&view=diff
==============================================================================
--- llvm/branches/release_36/test/Instrumentation/MemorySanitizer/atomics.ll (original)
+++ llvm/branches/release_36/test/Instrumentation/MemorySanitizer/atomics.ll Fri Feb 6 16:06:43 2015
@@ -1,4 +1,6 @@
; RUN: opt < %s -msan -msan-check-access-address=0 -S | FileCheck %s
+; RUN: opt < %s -msan -msan-check-access-address=0 -msan-track-origins=1 -S | FileCheck %s
+; RUN: opt < %s -msan -msan-check-access-address=0 -msan-track-origins=2 -S | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
More information about the llvm-branch-commits
mailing list