Memory leaks detected by valgrind

*nix specific usage questions
Alexolut
Blank Cone
Blank Cone
Posts: 21
Joined: 28 Aug 2012 12:39

Memory leaks detected by valgrind

Postby Alexolut » 08 Apr 2016 18:49

On the basis of apparent memory leaks, which I have mentioned in the topic dedicated to another operating system, I decided to more thoroughly identify the cause.

I cloned the repository and build VLC from sources used commit git commit 0baad719c5fc47caee6e3429128800a8e1edc6f0.
It took a little longer than I expected to carry out a successful build. But I did it.
My OS is Ubuntu 14.04 x64.

I ran vlc under the valgrind to determine memory leaks by command:

Code: Select all

./vlc --intf rc file:///<path_to_small_video.avi>
After playbacked once I push quit command, I valgrind said me that about 53K definitily lost.
I tried start playing for 8 times and see increasion of memory definitily lost (476K). Here is summary:

Code: Select all

==30223== 475,964 bytes in 463 blocks are definitely lost in loss record 187 of 187 ==30223== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==30223== by 0x1ABEE158: lavc_CopyPicture (video.c:253) ==30223== by 0x1ABEE158: DecodeVideo (video.c:815) ==30223== by 0x5876184: DecoderDecodeVideo (decoder.c:976) ==30223== by 0x5877CAB: DecoderProcessVideo (decoder.c:1036) ==30223== by 0x5877CAB: DecoderProcess (decoder.c:1350) ==30223== by 0x5877CAB: DecoderThread (decoder.c:1500) ==30223== by 0x505D181: start_thread (pthread_create.c:312) ==30223== by 0x557147C: clone (clone.S:111)
I'm not familiar with vlc architecture yet and can't understand now where the correct place to call free() for leaked memory.
I think this information should be useful for someone who knows more then I about vlc development.

Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 11 guests