#11362 closed defect (invalid)
memory leaks error at __interceptor_malloc
Reported by: | 0x20z | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | |
Cc: | 0x20z | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description (last modified by )
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@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@lists.debian.org>
Homepage: https://www.videolan.org/developers/x264.html
Attachments (1)
Change History (5)
by , 10 days ago
comment:1 by , 10 days ago
Description: | modified (diff) |
---|
comment:2 by , 9 days ago
Keywords: | bugs removed |
---|---|
Priority: | important → normal |
Resolution: | → invalid |
Status: | new → closed |
comment:3 by , 7 days ago
Okay, thank you. Does it have to be replicated in the latest version to find a problem in ffmpeg
comment:4 by , 7 days ago
Does it have to be replicated in the latest version
Yes, https://code.videolan.org/videolan/x264 latest commit
This looks like a memleak in libx264, not ffmpeg. x264_encoder_open() fails and apparently doesn't do a proper clean up. You should report it to them.