[FFmpeg-trac] #11362(avcodec:new): memory leaks error at __interceptor_malloc
FFmpeg
trac at avcodec.org
Fri Dec 20 12:29:26 EET 2024
#11362: memory leaks error at __interceptor_malloc
------------------------------------+-----------------------------------
Reporter: 0x20z | Owner: (none)
Type: defect | Status: new
Priority: important | Component: avcodec
Version: git-master | Resolution:
Keywords: bugs | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Description changed by 0x20z:
Old description:
> Summary of the bug:
> Hello ,Dear developers,
> I have encountered a memory leak issue while using ffmpeg version
> n7.2-dev and version 7.1.git. When I execute configure, if I enable --
> enable-libx264 and -- enable gpl, the issue will be triggered. If I do
> not enable these two options, there will be no problem. Please confirm
>
> How to reproduce:
> unzip FFmpeg-n7.2-dev.zip
> cd FFmpeg-n7.2-dev
> ./configure --enable-libx264 --enable-gpl --cc=clang --cxx=clang++
> --toolchain=clang-asan --enable-cross-compile
> ./ffmpeg -i pocffmpeg test.mp4
>
> crash log:
> =================================================================
> ==1590113==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 136 byte(s) in 1 object(s) allocated from:
> #0 0x5e7e1e17e67e in __interceptor_malloc
> (/home/swift/workstation/github/FFmpeg-master/ffmpeg+0x98067e) (BuildId:
> 2e3adc0cc0a1ce7cb06b6662338d6fd012a2a61b)
> #1 0x731353c0c3d1 (/usr/lib/x86_64-linux-gnu/libx264.so.163+0xc3d1)
> (BuildId: b2e7160a74448d05d96f3305d73fc2316edbedaf)
>
> Indirect leak of 30 byte(s) in 2 object(s) allocated from:
> #0 0x5e7e1e169083 in __interceptor_strdup
> (/home/swift/workstation/github/FFmpeg-master/ffmpeg+0x96b083) (BuildId:
> 2e3adc0cc0a1ce7cb06b6662338d6fd012a2a61b)
> #1 0x731353c0c353 (/usr/lib/x86_64-linux-gnu/libx264.so.163+0xc353)
> (BuildId: b2e7160a74448d05d96f3305d73fc2316edbedaf)
>
> SUMMARY: AddressSanitizer: 166 byte(s) leaked in 3 allocation(s).
>
> ffmpeg version:
> $ ./ffmpeg -version
> ffmpeg version 7.1.git Copyright (c) 2000-2024 the FFmpeg developers
> built with Ubuntu clang version 14.0.0-1ubuntu1.1
> configuration: --enable-libx264 --cc=clang --cxx=clang++ --enable-gpl
> --toolchain=clang-asan
> libavutil 59. 51.100 / 59. 51.100
> libavcodec 61. 27.101 / 61. 27.101
> libavformat 61. 9.101 / 61. 9.101
> libavdevice 61. 4.100 / 61. 4.100
> libavfilter 10. 6.101 / 10. 6.101
> libswscale 8. 12.100 / 8. 12.100
> libswresample 5. 4.100 / 5. 4.100
> libpostproc 58. 4.100 / 58. 4.100
New description:
Summary of the bug:
Hello ,Dear developers,
I have encountered a memory leak issue while using ffmpeg version n7.2-dev
and version 7.1.git. When I execute configure, if I enable -- enable-
libx264 and -- enable gpl, the issue will be triggered. If I do not enable
these two options, there will be no problem. Please confirm
How to reproduce:
unzip FFmpeg-n7.2-dev.zip
cd FFmpeg-n7.2-dev
./configure --enable-libx264 --enable-gpl --cc=clang --cxx=clang++
--toolchain=clang-asan --enable-cross-compile
./ffmpeg -i pocffmpeg test.mp4
crash log:
=================================================================
==1590113==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 136 byte(s) in 1 object(s) allocated from:
#0 0x5e7e1e17e67e in __interceptor_malloc
(/home/swift/workstation/github/FFmpeg-master/ffmpeg+0x98067e) (BuildId:
2e3adc0cc0a1ce7cb06b6662338d6fd012a2a61b)
#1 0x731353c0c3d1 (/usr/lib/x86_64-linux-gnu/libx264.so.163+0xc3d1)
(BuildId: b2e7160a74448d05d96f3305d73fc2316edbedaf)
Indirect leak of 30 byte(s) in 2 object(s) allocated from:
#0 0x5e7e1e169083 in __interceptor_strdup
(/home/swift/workstation/github/FFmpeg-master/ffmpeg+0x96b083) (BuildId:
2e3adc0cc0a1ce7cb06b6662338d6fd012a2a61b)
#1 0x731353c0c353 (/usr/lib/x86_64-linux-gnu/libx264.so.163+0xc353)
(BuildId: b2e7160a74448d05d96f3305d73fc2316edbedaf)
SUMMARY: AddressSanitizer: 166 byte(s) leaked in 3 allocation(s).
ffmpeg version:
$ ./ffmpeg -version
ffmpeg version 7.1.git Copyright (c) 2000-2024 the FFmpeg developers
built with Ubuntu clang version 14.0.0-1ubuntu1.1
configuration: --enable-libx264 --cc=clang --cxx=clang++ --enable-gpl
--toolchain=clang-asan
libavutil 59. 51.100 / 59. 51.100
libavcodec 61. 27.101 / 61. 27.101
libavformat 61. 9.101 / 61. 9.101
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 6.101 / 10. 6.101
libswscale 8. 12.100 / 8. 12.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100
ubuntu version:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
$ uname -r
6.8.0-49-generic
libx264 version:
$ dpkg -s libx264-dev
Package: libx264-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 2761
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: x264
Version: 2:0.163.3060+git5db6aa6-2build1
Depends: libx264-163 (= 2:0.163.3060+git5db6aa6-2build1)
Description: development files for libx264
libx264 is an advanced encoding library for creating H.264 (MPEG-4 AVC)
video streams.
.
This package contains the static library and headers used to build
programs
that use libx264.
Original-Maintainer: Debian Multimedia Maintainers <debian-
multimedia at lists.debian.org>
Homepage: https://www.videolan.org/developers/x264.html
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11362#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list