Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leaks in Ap4DescriptorFactory.cpp:98 #921

Open
pip-izony opened this issue Jan 29, 2024 · 0 comments
Open

Memory leaks in Ap4DescriptorFactory.cpp:98 #921

pip-izony opened this issue Jan 29, 2024 · 0 comments
Assignees
Labels

Comments

@pip-izony
Copy link

pip-izony commented Jan 29, 2024

Environment

Ubuntu 22.04.3 LTS

Compiler

clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix

Affected Version

Bento4 v1.6.0-641

Step to reproduce

pushd Bento4
mkdir bld
pushd bld
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-fsanitize=address -fno-inline" ..
make -j4

./mp42aac <PoCfile> /dev/null

Contents of PoCfile

Unzip the file below.

PoC.zip

Expected behavior

Print error or warning messages handled within mp42aac.

Current behavior

==1184923==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x4fa217 in operator new(unsigned long) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:99:3
    #1 0x63c025 in AP4_DescriptorFactory::CreateDescriptorFromStream(AP4_ByteStream&, AP4_Descriptor*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4DescriptorFactory.cpp:98:26
    #2 0x6481e6 in AP4_EsdsAtom::AP4_EsdsAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4EsdsAtom.cpp:76:9
    #3 0x647e25 in AP4_EsdsAtom::Create(unsigned int, AP4_ByteStream&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4EsdsAtom.cpp:52:16
    #4 0x5bfeae in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:508:20
    #5 0x5bbc50 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14
    #6 0x607ad4 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12
    #7 0x5439d3 in AP4_AudioSampleEntry::AP4_AudioSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:420:5
    #8 0x5bbc50 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14
    #9 0x552854 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:101:13
    #10 0x551bc2 in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:57:16
    #11 0x5bf8d0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:458:20
    #12 0x5bbc50 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14
    #13 0x607ad4 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12
    #14 0x607868 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5
    #15 0x5bf3ec in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20
    #16 0x5bbc50 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14
    #17 0x607bd3 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12
    #18 0x607868 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5
    #19 0x5bf3ec in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20
    #20 0x5bbc50 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14
    #21 0x607bd3 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12
    #22 0x607868 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5
    #23 0x5bf3ec in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20
    #24 0x5bbc50 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14
    #25 0x607bd3 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12
    #26 0x607868 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/SLICER/Google_testsuite_scripts//SLICER/Google_testsuite_scripts/scripts/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5

SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s).
@pip-izony pip-izony changed the title Memory leaks in Ap4DescriptorFactory.cpp:97 Memory leaks in Ap4DescriptorFactory.cpp:98 Jan 29, 2024
@barbibulle barbibulle self-assigned this Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants