[mythtv-commits] Ticket #13412: Valgrind error in threadedfilewriter

MythTV noreply at mythtv.org
Sat Feb 23 21:24:35 UTC 2019

#13412: Valgrind error in threadedfilewriter
     Reporter:  Klaas de Waal     |      Owner:  (none)
         Type:  Patch - Bug Fix   |     Status:  new
     Priority:  minor             |  Milestone:  needs_triage
    Component:  MythTV - General  |    Version:  Master Head
     Severity:  medium            |   Keywords:  TFW uninitialized memory
Ticket locked:  0                 |
 Running mythbackend with valgrind gives the following error message:

 ==14156== Conditional jump or move depends on uninitialised value(s)
 ==14156==    at 0x72CC8A3: ThreadedFileWriter::DiskLoop()
 ==14156==  Uninitialised value was created by a heap allocation
 ==14156==    at 0x4838E86: operator new(unsigned long)
 ==14156==    by 0x667A50E: FileRingBuffer::FileRingBuffer(QString const&,
 bool, bool, int) (fileringbuffer.cpp:72)


 This is line 455 of threadedfilewriter.cpp:

         if (!m_flush && (mwte < 250) && (m_totalBufferUse <


 The problem is caused by m_flush; this class member is not initialized
 when a new instance of ThreadedFileWriter is created.\\
 The fix is to add initialization of m_flush in threadedfilewriter.h.\\
 Patch is attached.

Ticket URL: <https://code.mythtv.org/trac/ticket/13412>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list