summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c86ed8)
raw | patch | inline | side by side (parent: 2c86ed8)
author | Yaron Keren <yaron.keren@gmail.com> | |
Fri, 12 Dec 2014 11:07:51 +0000 (11:07 +0000) | ||
committer | Yaron Keren <yaron.keren@gmail.com> | |
Fri, 12 Dec 2014 11:07:51 +0000 (11:07 +0000) |
In release builds this is actually possible as without asserts there is
no testing of the actual read bytes and the variables could be partially
uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224114 91177308-0d34-0410-b5e6-96231b3b80d8
no testing of the actual read bytes and the variables could be partially
uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224114 91177308-0d34-0410-b5e6-96231b3b80d8
tools/lli/ChildTarget/ChildTarget.cpp | patch | blob | history |
index 0d71b17c63dd7499ce86e1bf4a6fff7f32592442..6c537d47df3d1ee5443fd94d1b6faa3d0ad1bc35 100644 (file)
// Incoming message handlers
void LLIChildTarget::handleAllocateSpace() {
// Read and verify the message data size.
- uint32_t DataSize;
+ uint32_t DataSize = 0;
int rc = ReadBytes(&DataSize, 4);
(void)rc;
assert(rc == 4);
assert(DataSize == 8);
// Read the message arguments.
- uint32_t Alignment;
- uint32_t AllocSize;
+ uint32_t Alignment = 0;
+ uint32_t AllocSize = 0;
rc = ReadBytes(&Alignment, 4);
assert(rc == 4);
rc = ReadBytes(&AllocSize, 4);
void LLIChildTarget::handleLoadSection(bool IsCode) {
// Read the message data size.
- uint32_t DataSize;
+ uint32_t DataSize = 0;
int rc = ReadBytes(&DataSize, 4);
(void)rc;
assert(rc == 4);
// Read the target load address.
- uint64_t Addr;
+ uint64_t Addr = 0;
rc = ReadBytes(&Addr, 8);
assert(rc == 8);
size_t BufferSize = DataSize - 8;
void LLIChildTarget::handleExecute() {
// Read the message data size.
- uint32_t DataSize;
+ uint32_t DataSize = 0;
int rc = ReadBytes(&DataSize, 4);
(void)rc;
assert(rc == 4);
assert(DataSize == 8);
// Read the target address.
- uint64_t Addr;
+ uint64_t Addr = 0;
rc = ReadBytes(&Addr, 8);
assert(rc == 8);