Message ID | 44709617.20804@e-tobi.net |
---|---|
State | New |
Headers |
Received: from moutng.kundenserver.de ([212.227.126.187]) by www.linuxtv.org with esmtp (Exim 4.50) id 1Fhqr8-0008MA-O0 for vdr@linuxtv.org; Sun, 21 May 2006 18:32:38 +0200 Received: from [84.184.25.27] (helo=[192.168.30.10]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1Fhqqt3rn2-0003pS; Sun, 21 May 2006 18:32:36 +0200 Message-ID: <44709617.20804@e-tobi.net> Date: Sun, 21 May 2006 18:32:23 +0200 From: Tobias Grimm <listaccount@e-tobi.net> User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: VDR Mailing List <vdr@linuxtv.org> Content-Type: multipart/mixed; boundary="------------060106060801010002090702" X-Provags-ID: kundenserver.de abuse@kundenserver.de login:3a660adf8439ddc7be7d699eb4083112 Subject: [vdr] Some small bug in vdr 1.4.0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List <vdr@linuxtv.org> List-Id: VDR Mailing List <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Sun, 21 May 2006 16:32:39 -0000 Status: O X-Status: X-Keywords: X-UID: 9550 |
Commit Message
Tobias Grimm
May 21, 2006, 4:32 p.m. UTC
Hi! While checking some plugins with valgrind, I stumbled across this minor bug in vdr: The skinDescriptions array allocated in cMenuSetupOsd should be deleted with delete[] instead of delete. bye, Tobias
Comments
On Sun, May 21, 2006 at 06:32:23PM +0200, Tobias Grimm wrote: Hello, > While checking some plugins with valgrind, I stumbled across this minor > bug in vdr: That's great, is there a "tutorial" for using valgrind ? I have a "quiete patched" vdr which produce : *** glibc detected *** corrupted double-linked list: 0x000000000071b510 *** Thank you very much,
Gregoire Favre wrote: >That's great, is there a "tutorial" for using valgrind ? > > See here: http://www.cprogramming.com/debugging/valgrind.html http://valgrind.org/ for the Debian vdr packages in my repository (sorry, german only) : http://www.e-tobi.net/blog/articles/2006/04/30/speicherlecks-im-vdr-finden Debugging a vdr plugin with valgrind is a little bit tricky, because the symbols get lost, when VDR unloads the plugins. That's why I've built a small patch for the Debian vdr debug package. With this patch, you can force VDR to keep the plugin libs loaded with the options -k or --keep-plugins. I've attached the patch to this mail. Don't forget to compile VDR and the plugins with debugging informaton ( -g ) and without optimization (-O0) - and don't strip the symbols from the binary! bye, Tobias
On Wed, May 24, 2006 at 07:42:21PM +0200, Tobias Grimm wrote: > Don't forget to compile VDR and the plugins with debugging informaton ( > -g ) and without optimization (-O0) - and don't strip the symbols from > the binary! Hello, very very interesting !!! (Un)fortunately, without -O3 my VDR don't crash anymore : -O2 is perfect !!! Thank you very much,
Gregoire Favre <gregoire.favre@gmail.com> wrote: > On Wed, May 24, 2006 at 07:42:21PM +0200, Tobias Grimm wrote: > > > Don't forget to compile VDR and the plugins with debugging > > informaton ( -g ) and without optimization (-O0) - and don't > > strip the symbols from the binary! > (Un)fortunately, without -O3 my VDR don't crash anymore : -O2 is > perfect !!! sounds as you are overrunning memory somewhere (off by one error). you can ofcourse use valgrind and gdb even on optimized code, but they work better when not optimizing. clemens
--- vdr-1.4.0.orig/menu.c +++ vdr-1.4.0/menu.c @@ -2131,7 +2131,7 @@ cMenuSetupOSD::~cMenuSetupOSD() { cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]); - delete skinDescriptions; + delete[] skinDescriptions; } void cMenuSetupOSD::Set(void)