[x265] Issue #482: Leak Memory (multicoreware/x265)

Hữu Quang Linh Lê issues-reply at bitbucket.org
Thu Mar 14 15:37:32 CET 2019


New issue 482: Leak Memory
https://bitbucket.org/multicoreware/x265/issues/482/leak-memory

Hữu Quang Linh Lê:

I found some input causing leak memory. This is crash information.
```
INFO: Seed: 3904123746
INFO: Loaded 1 modules   (50397 inline 8-bit counters): 50397 [0x1267560, 0x1273a3d),
INFO: Loaded 1 PC tables (50397 PCs): 50397 [0x1273a40,0x1338810),
./encoder-fuzzer: Running 1 inputs 1 time(s) each.
Running: leak-034018c6753ae7d385399bf5c3071ba3863a95c8

=================================================================
==30238==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 984 byte(s) in 1 object(s) allocated from:
    #0 0x4b2f4e in posix_memalign /src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:218
    #1 0xc2f80c in x265::x265_malloc(unsigned long) /src/x265/source/common/common.cpp:81:9
    #2 0xc302d9 in x265_param_alloc /src/x265/source/common/param.cpp:95:25
    #3 0x7f059d in x265_encoder_open_169 /src/x265/source/encoder/api.cpp:97:37
    #4 0x6082d0 in x265_encode_image(void*, heif_image const*, heif_image_input_class) /src/libheif/libheif/heif_encoder_x265.cc:707:22
    #5 0x5d52d4 in heif::HeifContext::Image::encode_image_as_hevc(std::__1::shared_ptr<heif::HeifPixelImage>, heif_encoder*, heif_encoding_options const*, heif_image_input_class) /src/libheif/libheif/heif_context.cc:1700:27
    #6 0x5d4791 in heif::HeifContext::encode_image(std::__1::shared_ptr<heif::HeifPixelImage>, heif_encoder*, heif_encoding_options const*, heif_image_input_class, std::__1::shared_ptr<heif::HeifContext::Image>&) /src/libheif/libheif/heif_context.cc:1608:28
    #7 0x5b8f47 in heif_context_encode_image /src/libheif/libheif/heif.cc:1561:25
    #8 0x60bfa8 in LLVMFuzzerTestOneInput /src/libheif/libheif/encoder_fuzzer.cc:161:9
    #9 0x6465f5 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:529:15
    #10 0x60e076 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/libfuzzer/FuzzerDriver.cpp:286:6
    #11 0x619ba3 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:715:9
    #12 0x60d6ec in main /src/libfuzzer/FuzzerMain.cpp:19:10
    #13 0x7f9cd365582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 984 byte(s) leaked in 1 allocation(s).
```
Do you think this is a bug? I want to report to you so that I can fix this soon.




More information about the x265-devel mailing list