Bug 624317 - vncviewer memory leak at rfb::DecompressJpegRect (tightDecode.h:297)
Summary: vncviewer memory leak at rfb::DecompressJpegRect (tightDecode.h:297)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tigervnc
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-16 01:06 UTC by Tim Taiwanese Liim
Modified: 2013-04-30 23:46 UTC (History)
2 users (show)

Fixed In Version: tigervnc-1.0.1-3.fc12
Clone Of:
Environment:
Last Closed: 2010-09-02 20:40:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Taiwanese Liim 2010-08-16 01:06:12 UTC
Description of problem:
    Memory leak at rfb::DecompressJpegRect (tightDecode.h:297), where we
    have
      JSAMPROW *rowPointer = new JSAMPROW[h];
    but there is no corresponding delete[] rowPointer.  My vncviewer
    reached >2GB in memory after 1 day when playing some slide show.

Version-Release number of selected component (if applicable):
    tigervnc-1.0.1-1.fc12.x86_64

How reproducible:
    always (at least when I runs slide show on my photo collection)

Steps to Reproduce:
    1. run valgrind to check for memory leak:
            valgrind --leak-check=full unix/vncviewer/vncviewer 
       to connect to a vnc server
    2. run some slide show in the vnc (not sure if this is necessary)
    3. wait for a few minutes.
    4. hit ctrl-C to interrupt.

Actual results:
    Valgrind reports memory leak at 
            rfb::DecompressJpegRect (tightDecode.h:297)
    See [1] below for detail.

Expected results:
    There should be no memory leak (at least no more than a few
    hundred kB).

Additional info:
    [1] report from valgrind after a few hours (115MB leaked):
       115,900,712 bytes in 235,469 blocks are definitely lost in loss 
             record 255 of 255
          at 0x4A055EC: operator new[](unsigned long) 
             (vg_replace_malloc.c:264)
          by 0x42A630: rfb::DecompressJpegRect(rfb::Rect const&, 
             rdr::InStream*, unsigned int*, rfb::CMsgHandler*) 
             (tightDecode.h:297)
          by 0x42C20C: rfb::tightDecode32(rfb::Rect const&, rdr::InStream*,
             rdr::ZlibInStream*, unsigned int*, rfb::CMsgHandler*) 
             (tightDecode.h:100)
          by 0x440E9B: rfb::CMsgReader::readRect(rfb::Rect const&, 
             unsigned int) (CMsgReader.cxx:115)
          by 0x41AF81: rfb::CMsgReaderV3::readMsg() (CMsgReaderV3.cxx:94)
          by 0x413EDA: main (vncviewer.cxx:407)

Comment 1 Adam Tkac 2010-08-19 09:00:07 UTC
Right you are, thanks for the report. This issue will be fixed in the next update.

Comment 2 Tim Taiwanese Liim 2010-08-20 16:06:19 UTC
Glad that I can help!

Comment 3 Fedora Update System 2010-08-25 15:11:41 UTC
tigervnc-1.0.1-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/tigervnc-1.0.1-2.fc12

Comment 4 Fedora Update System 2010-08-25 15:11:45 UTC
tigervnc-1.0.1-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/tigervnc-1.0.1-3.fc12

Comment 5 Fedora Update System 2010-08-26 01:02:32 UTC
tigervnc-1.0.1-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tigervnc'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/tigervnc-1.0.1-3.fc12

Comment 6 Fedora Update System 2010-09-02 20:39:58 UTC
tigervnc-1.0.1-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.