Clear empty video frames in unittest so DrMemory will allow them to be read without an uninitialized read error.

BUG=libyuv:263
TESTED=drmemory out\Debug\modules_unittests.exe --gtest_filter=*PreprocessorLogic
R=kjellander@webrtc.org, mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4319004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5168 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fbarchard@google.com 2013-11-25 09:06:33 +00:00
parent aa74b5d690
commit b5bc098e20
2 changed files with 80 additions and 91 deletions

View File

@ -1,90 +1,76 @@
# This file is used in addition to the one already maintained in Chrome. # This file is used in addition to the one already maintained in Chrome.
# It acts as a place holder for future additions for WebRTC. # It acts as a place holder for future additions for WebRTC.
# It must exist for the Python wrapper script to work properly. # It must exist for the Python wrapper script to work properly.
INVALID HEAP ARGUMENT INVALID HEAP ARGUMENT
name=https://code.google.com/p/webrtc/issues/detail?id=2321 (1) name=https://code.google.com/p/webrtc/issues/detail?id=2321 (1)
drmemorylib.dll!replace_operator_delete_array drmemorylib.dll!replace_operator_delete_array
*!webrtc::scoped_array<short>::~scoped_array<short> *!webrtc::scoped_array<short>::~scoped_array<short>
*!webrtc::PushResampler::~PushResampler *!webrtc::PushResampler::~PushResampler
... ...
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
INVALID HEAP ARGUMENT INVALID HEAP ARGUMENT
name=https://code.google.com/p/webrtc/issues/detail?id=2321 (2) name=https://code.google.com/p/webrtc/issues/detail?id=2321 (2)
drmemorylib.dll!replace_operator_delete_array drmemorylib.dll!replace_operator_delete_array
*!webrtc::scoped_array<float>::~scoped_array<float> *!webrtc::scoped_array<float>::~scoped_array<float>
*!webrtc::PushSincResampler::~PushSincResampler *!webrtc::PushSincResampler::~PushSincResampler
... ...
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
GDI USAGE ERROR GDI USAGE ERROR
name=https://code.google.com/p/webrtc/issues/detail?id=2323 (1) name=https://code.google.com/p/webrtc/issues/detail?id=2323 (1)
system call NtGdiDeleteObjectApp system call NtGdiDeleteObjectApp
GDI32.dll!DeleteDC GDI32.dll!DeleteDC
GDI32.dll!DeleteDC GDI32.dll!DeleteDC
*!webrtc::`anonymous namespace'::WindowCapturerWin::Capture *!webrtc::`anonymous namespace'::WindowCapturerWin::Capture
... ...
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
UNINITIALIZED READ UNINITIALIZED READ
name=https://code.google.com/p/webrtc/issues/detail?id=2323 (2) name=https://code.google.com/p/webrtc/issues/detail?id=2323 (2)
system call NtUserGetThreadDesktop parameter value #1 system call NtUserGetThreadDesktop parameter value #1
*!webrtc::Desktop::GetThreadDesktop *!webrtc::Desktop::GetThreadDesktop
*!webrtc::ScopedThreadDesktop::ScopedThreadDesktop *!webrtc::ScopedThreadDesktop::ScopedThreadDesktop
*!webrtc::`anonymous namespace'::ScreenCapturerWin::ScreenCapturerWin *!webrtc::`anonymous namespace'::ScreenCapturerWin::ScreenCapturerWin
*!webrtc::ScreenCapturer::CreateWithDisableAero *!webrtc::ScreenCapturer::CreateWithDisableAero
*!webrtc::ScreenCapturer::Create *!webrtc::ScreenCapturer::Create
... ...
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
UNINITIALIZED READ LEAK
name=https://code.google.com/p/libyuv/issues/detail?id=263 name=https://code.google.com/p/webrtc/issues/detail?id=2333
*!ScaleAddRows_SSE2 drmemorylib.dll!replace_operator_new
... *!webrtc::test::UdpSocketWrapper::CreateSocket
*!ScalePlaneDown *!webrtc::test::UdpSocketManager_AddAndRemoveSocketDoesNotLeakMemory_Test::TestBody
*!ScalePlane *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
*!I420Scale
*!webrtc::Scaler::Scale INVALID HEAP ARGUMENT
*!webrtc::VPMSimpleSpatialResampler::ResampleFrame name=https://code.google.com/p/webrtc/issues/detail?id=2515 (1)
*!webrtc::VPMFramePreprocessor::PreprocessFrame drmemorylib.dll!replace_operator_delete_nothrow
*!webrtc::VideoProcessingModuleImpl::PreprocessFrame *!webrtc::scoped_array<short>::~scoped_array<short>
*!webrtc::VideoProcessingModuleTest_PreprocessorLogic_Test::TestBody *!webrtc::NetEqImpl::~NetEqImpl
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> *!webrtc::NetEqImpl::`scalar deleting destructor'
...
LEAK *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
name=https://code.google.com/p/webrtc/issues/detail?id=2333
drmemorylib.dll!replace_operator_new INVALID HEAP ARGUMENT
*!webrtc::test::UdpSocketWrapper::CreateSocket name=https://code.google.com/p/webrtc/issues/detail?id=2515 (2)
*!webrtc::test::UdpSocketManager_AddAndRemoveSocketDoesNotLeakMemory_Test::TestBody drmemorylib.dll!replace_operator_delete_nothrow
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> *!webrtc::scoped_array<short>::reset
*!webrtc::NetEqImpl::SetSampleRateAndChannels
INVALID HEAP ARGUMENT *!webrtc::NetEqImpl::InsertPacketInternal
name=https://code.google.com/p/webrtc/issues/detail?id=2515 (1) *!webrtc::NetEqImpl::InsertPacket
drmemorylib.dll!replace_operator_delete_nothrow ...
*!webrtc::scoped_array<short>::~scoped_array<short> *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
*!webrtc::NetEqImpl::~NetEqImpl
*!webrtc::NetEqImpl::`scalar deleting destructor' UNINITIALIZED READ
... name=https://code.google.com/p/webrtc/issues/detail?id=2516
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> system call NtUserGetThreadDesktop parameter value #1
*!webrtc::Desktop::GetThreadDesktop
INVALID HEAP ARGUMENT *!webrtc::ScopedThreadDesktop::ScopedThreadDesktop
name=https://code.google.com/p/webrtc/issues/detail?id=2515 (2) *!webrtc::`anonymous namespace'::ScreenCapturerWin::ScreenCapturerWin
drmemorylib.dll!replace_operator_delete_nothrow *!webrtc::ScreenCapturer::Create
*!webrtc::scoped_array<short>::reset *!webrtc::ScreenCapturerTest::SetUp
*!webrtc::NetEqImpl::SetSampleRateAndChannels *!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
*!webrtc::NetEqImpl::InsertPacketInternal
*!webrtc::NetEqImpl::InsertPacket
...
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
UNINITIALIZED READ
name=https://code.google.com/p/webrtc/issues/detail?id=2516
system call NtUserGetThreadDesktop parameter value #1
*!webrtc::Desktop::GetThreadDesktop
*!webrtc::ScopedThreadDesktop::ScopedThreadDesktop
*!webrtc::`anonymous namespace'::ScreenCapturerWin::ScreenCapturerWin
*!webrtc::ScreenCapturer::Create
*!webrtc::ScreenCapturerTest::SetUp
*!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>

View File

@ -45,7 +45,10 @@ void VideoProcessingModuleTest::SetUp() {
ASSERT_EQ(0, video_frame_.CreateEmptyFrame(width_, height_, width_, ASSERT_EQ(0, video_frame_.CreateEmptyFrame(width_, height_, width_,
half_width_, half_width_)); half_width_, half_width_));
// Clear video frame so DrMemory/Valgrind will allow reads of the buffer.
memset(video_frame_.buffer(kYPlane), 0, video_frame_.allocated_size(kYPlane));
memset(video_frame_.buffer(kUPlane), 0, video_frame_.allocated_size(kUPlane));
memset(video_frame_.buffer(kVPlane), 0, video_frame_.allocated_size(kVPlane));
const std::string video_file = const std::string video_file =
webrtc::test::ResourcePath("foreman_cif", "yuv"); webrtc::test::ResourcePath("foreman_cif", "yuv");
source_file_ = fopen(video_file.c_str(),"rb"); source_file_ = fopen(video_file.c_str(),"rb");