New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687087 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jan 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Memcheck:Uninitialized in PacketRouterTest.TimeToSendPacket

Project Member Reported by philipel@chromium.org, Jan 31 2017

Issue description

When running PacketRouterTest.TimeToSendPacket with this CL: https://codereview.chromium.org/2628563003/ we get this error:

UninitCondition
Conditional jump or move depends on uninitialised value(s)
  vfprintf (/build/eglibc-oGUzwX/eglibc-2.19/stdio-common/vfprintf.c:1660)
  vsnprintf (/build/eglibc-oGUzwX/eglibc-2.19/libio/vsnprintf.c:119)
  snprintf (/build/eglibc-oGUzwX/eglibc-2.19/stdio-common/snprintf.c:33)
  testing::(anonymous namespace)::PrintByteSegmentInObjectTo(unsigned char const*, unsigned long, unsigned long, std::basic_ostream<char, std::char_traits<char> >*) (/b/s/w/ir5tuaWk/out/Release/modules_unittests)
  testing::internal2::PrintBytesInObjectTo(unsigned char const*, unsigned long, std::basic_ostream<char, std::char_traits<char> >*) (/b/s/w/ir5tuaWk/out/Release/modules_unittests)
  testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void const*) (/b/s/w/ir5tuaWk/out/Release/modules_unittests)
  webrtc::MockRtpRtcp::FlexfecSsrc() const (/b/s/w/ir5tuaWk/out/Release/modules_unittests)
  webrtc::PacketRouter::TimeToSendPacket(unsigned int, unsigned short, long, bool, webrtc::PacedPacketInfo const&) (/b/s/w/ir5tuaWk/out/Release/modules_unittests)
  webrtc::PacketRouterTest_TimeToSendPacket_Test::TestBody() (/b/s/w/ir5tuaWk/out/Release/modules_unittests)
Suppression (error hash=#0BAECF20FF34ECD2#):
  For more info on using suppressions see http://dev.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff#TOC-Suppressing-memory-reports
{
   <insert_a_suppression_name_here>
   Memcheck:Uninitialized
   fun:vfprintf
   fun:vsnprintf
   fun:snprintf
   fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo
   fun:_ZN7testing9internal220PrintBytesInObjectToEPKhmPSo
   fun:_ZN7testing8internal25UntypedFunctionMockerBase17UntypedInvokeWithEPKv
   fun:_ZNK6webrtc11MockRtpRtcp11FlexfecSsrcEv
   fun:_ZN6webrtc12PacketRouter16TimeToSendPacketEjtlbRKNS_15PacedPacketInfoE
   fun:_ZN6webrtc38PacketRouterTest_TimeToSendPacket_Test8TestBodyEv
}

https://build.chromium.org/p/tryserver.webrtc/builders/linux_memcheck/builds/4632/steps/modules_unittests%20on%20Ubuntu-14.04/logs/stdio

I belive this is due to the gmock framework printing the content of an rtc::optional containing no value (and thus uninitialized memory). The function "webrtc::MockRtpRtcp::FlexfecSsrc() const" returns a rtc::Optional<uint32_t>.

GMOCK WARNING:
Uninteresting mock function call - returning default value.
    Function call: FlexfecSsrc()
          Returns: 8-byte object <00-00 00-00 00-00 00-00>
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/a7ee14ebf540e43862cefb2516f18f770230f198

commit a7ee14ebf540e43862cefb2516f18f770230f198
Author: philipel <philipel@webrtc.org>
Date: Tue Jan 31 10:45:54 2017

Suppress Memcheck:Uninitialized error when printing rtc::optional.

BUG= chromium:687087 ,  webrtc:6822 
NOTRY=True

Review-Url: https://codereview.webrtc.org/2669463003
Cr-Commit-Position: refs/heads/master@{#16372}

[modify] https://crrev.com/a7ee14ebf540e43862cefb2516f18f770230f198/tools-webrtc/valgrind/memcheck/suppressions.txt

Status: Verified (was: Assigned)

Sign in to add a comment