[lld] r287797 - Fix uninitialized variable access.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 11:03:35 PST 2016
Author: ruiu
Date: Wed Nov 23 13:03:35 2016
New Revision: 287797
URL: http://llvm.org/viewvc/llvm-project?rev=287797&view=rev
Log:
Fix uninitialized variable access.
Modified:
lld/trunk/ELF/Config.h
Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=287797&r1=287796&r2=287797&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Wed Nov 23 13:03:35 2016
@@ -145,7 +145,7 @@ struct Configuration {
uint16_t DefaultSymbolVersion = llvm::ELF::VER_NDX_GLOBAL;
uint16_t EMachine = llvm::ELF::EM_NONE;
uint64_t EntryAddr = 0;
- uint64_t ErrorLimit;
+ uint64_t ErrorLimit = 20; // initialize it early so that error() won't complain
uint64_t ImageBase;
uint64_t MaxPageSize;
uint64_t ZStackSize;
More information about the llvm-commits
mailing list