]> granicus.if.org Git - llvm/commitdiff
[X86AsmParser] Fix msan: use-of-uninitialized-value after r311639
authorKrasimir Georgiev <krasimir@google.com>
Thu, 24 Aug 2017 13:38:18 +0000 (13:38 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Thu, 24 Aug 2017 13:38:18 +0000 (13:38 +0000)
Summary:
CodeGen/ms-inline-asm.c test triggers msan use-of-uninitialized-value here:
llvm/lib/MC/MCParser/AsmParser.cpp:5629:7

Reviewers: bkramer, coby

Differential Revision: https://reviews.llvm.org/D37105

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311653 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCParser/MCTargetAsmParser.h

index ed5930c3383f349ccd0afa690552e2d6555eda34..364b9fd32897b8dbf41a8fd01e307bc514f68a31 100644 (file)
@@ -115,7 +115,7 @@ public:
   AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len, StringRef label)
     : Kind(kind), Loc(loc), Len(len), Val(0), Label(label) {}
   AsmRewrite(SMLoc loc, unsigned len, IntelExpr exp)
-    : Kind(AOK_IntelExpr), Loc(loc), Len(len), IntelExp(exp) {}
+    : Kind(AOK_IntelExpr), Loc(loc), Len(len), Val(0), IntelExp(exp) {}
 };
 
 struct ParseInstructionInfo {