Skip to content

Commit

Permalink
Fix MSan report in HandleAllocatorTest.Reallocation
Browse files Browse the repository at this point in the history
[ RUN      ] HandleAllocatorTest.Reallocation
==30439==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x1a11ef5 in gl::HandleAllocator::allocate() third_party/angle/src/libANGLE/HandleAllocator.cpp:83:9
    #1 0x6643eb in (anonymous namespace)::HandleAllocatorTest_Reallocation_Test::TestBody() third_party/angle/src/libANGLE/HandleAllocator_unittest.cpp:75:42

Looks like a true positive, one of the ctors wasn't initializing a
field.

Change-Id: Id8a93fe6c9a6f1f01249235630981f4f0ac4a782
Reviewed-on: https://chromium-review.googlesource.com/987474
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
  • Loading branch information
nico authored and Commit Bot committed Mar 30, 2018
1 parent b1de5a7 commit b33972d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libANGLE/HandleAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ HandleAllocator::HandleAllocator() : mBaseValue(1), mNextValue(1), mLoggingEnabl
mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));
}

HandleAllocator::HandleAllocator(GLuint maximumHandleValue) : mBaseValue(1), mNextValue(1)
HandleAllocator::HandleAllocator(GLuint maximumHandleValue)
: mBaseValue(1), mNextValue(1), mLoggingEnabled(false)
{
mUnallocatedList.push_back(HandleRange(1, maximumHandleValue));
}
Expand Down

0 comments on commit b33972d

Please sign in to comment.