summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2018-04-24 20:30:56 +0000
committerChandler Carruth <chandlerc@gmail.com>2018-04-24 20:30:56 +0000
commit7e1c3345a058bcb12f05e4782ea9d41b306e853d (patch)
tree70a8187a7aa11d29c2d0693ece7d18b6dbcdfbc2 /llvm/lib/MC/WasmObjectWriter.cpp
parentb71251ca71c795ac8ae08c96f84328af6da0c613 (diff)
downloadbcm5719-llvm-7e1c3345a058bcb12f05e4782ea9d41b306e853d.tar.gz
bcm5719-llvm-7e1c3345a058bcb12f05e4782ea9d41b306e853d.zip
[wasm] Fix uninitialized memory introduced in r330749.
Found with MSan. This was causing all the WASM MC tests to fail about 10% of the time. llvm-svn: 330764
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 39b49b04bfe..0f8a42aacec 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -216,7 +216,7 @@ class WasmObjectWriter : public MCObjectWriter {
std::vector<WasmCustomSection> CustomSections;
unsigned NumFunctionImports = 0;
unsigned NumGlobalImports = 0;
- uint32_t SectionCount;
+ uint32_t SectionCount = 0;
// TargetObjectWriter wrappers.
bool is64Bit() const { return TargetObjectWriter->is64Bit(); }
OpenPOWER on IntegriCloud