libvlc Memory Leak on Linux
- Operation System: Linux wesdev 4.6.3-1-ARCH #1 (closed) SMP PREEMPT Fri Jun 24 21:19:13 CEST 2016 x86_64 GNU/Linux
- VLC Version:
VLC media player 2.2.4 Weatherwax (revision 2.2.3-37-g888b7e89)
VLC version 2.2.4 Weatherwax (2.2.3-37-g888b7e89)
Compiled by builduser on (Jul 23 2016 09:10:09)
Compiler: gcc version 6.1.1 20160707 (GCC)
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by the VideoLAN team; see the AUTHORS file.
- Hardware Specifications (Intel NUC5CPYH - ):
- Processor: Intel® Celeron® processor N3050
- RAM: 8GB
- Storage: 60GB SSD
- Graphics: Intel HD Graphics
- Audio: Integrated
To reproduce compile the code attached and run the following command while X11 is running: valgrind --leak-check=full ./run_test /glassmedia/media/PizzaHut_02.mp4
The code supplied only runs two iterations so the output for valgrind is much smaller. However, if you run it without valgrind and increase the number of iterations the program will eventually fail to allocate memory and crash.
Previously we were using Xine but decided to switch to VLC because it seems that Xine is no longer maintained. After making the switch we noticed a few of our systems had crashed, looking at the logs we saw many memory allocation errors. We tested this on several similarly configured systems and observed the same behavior.
We copied the example code here:
https://wiki.videolan.org/Documentation:VLC_for_dummies/
and made slight modifications to make the leak more apparent.
Please see attached .tar.gz for test code, make-file and valgrind output from our test-run using --leak-check=full
Thank you!