pdfalto icon indicating copy to clipboard operation
pdfalto copied to clipboard

Memory Leaks

Open grandnew opened this issue 5 years ago • 1 comments

I used Clang 6.0 and AddressSanitizer to build pdfalto, this file can cause memory leaks when executing this command:

./pdfalto detected_memory_leaks 1.xml

This is the ASAN information:

=================================================================
==12842==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 104340 byte(s) in 1 object(s) allocated from:
    #0 0x5184e8 in operator new[](unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:95
    #1 0x596941 in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6423:35
    #2 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 104340 byte(s) in 1 object(s) allocated from:
    #0 0x5184e8 in operator new[](unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:95
    #1 0x596941 in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6423:35
    #2 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 14000 byte(s) in 14 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff25d7f6 in xmlEncodeEntitiesInternal /home/fouzhe/my_fuzz/libxml2/entities.c:576

Direct leak of 120 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff282dc0 in xmlNewNode__internal_alias /home/fouzhe/my_fuzz/libxml2/tree.c:2239

Direct leak of 84 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0xb378a8 in gmalloc /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/gmem.cc:140:13
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 48 byte(s) in 3 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x52a5e1 in removeAlreadyExistingData(GString*) /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:464:20
    #2 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff281d6b in xmlNewNs__internal_alias /home/fouzhe/my_fuzz/libxml2/tree.c:757

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x59e8d1 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6721:26
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x54021f in TextPage::TextPage(int, Catalog*, _xmlNode*, GString*, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:1508:17
    #2 0x59fbc1 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6852:16
    #3 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x544254 in TextPage::startPage(int, GfxState*, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:1567:13
    #2 0x5a992b in XmlAltoOutputDev::startPage(int, GfxState*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7200:15

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x59b645 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6663:19
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x59e7e4 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6708:24
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x77b765 in Page::getLinks() /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/xpdf/Page.cc:311:11
    #2 0x544f81 in TextPage::startPage(int, GfxState*, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:1732:30
    #3 0x5a992b in XmlAltoOutputDev::startPage(int, GfxState*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7200:15

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a5597 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7079:18
    #2 0x5a49a8 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6938:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x59e681 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6692:18
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a55b1 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7080:19
    #2 0x5a4c24 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6954:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x540b34 in TextPage::TextPage(int, Catalog*, _xmlNode*, GString*, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:1552:23
    #2 0x59fbc1 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6852:16
    #3 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a55b1 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7080:19
    #2 0x5a490c in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6934:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a55b1 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7080:19
    #2 0x5a4b85 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6950:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x540abe in TextPage::TextPage(int, Catalog*, _xmlNode*, GString*, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:1551:23
    #2 0x59fbc1 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6852:16
    #3 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a5597 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7079:18
    #2 0x5a4b85 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6950:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a5597 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7079:18
    #2 0x5a4c24 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6954:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x595d0d in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6259:24
    #2 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a63db in XmlAltoOutputDev::getInfoDate(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7122:19
    #2 0x5a4c8a in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6958:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a63db in XmlAltoOutputDev::getInfoDate(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7122:19
    #2 0x5a4cf0 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6962:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x59e5cd in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6687:18
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x529331 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:395:23
    #2 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a55b1 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7080:19
    #2 0x5a4ae5 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6946:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x52902e in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:328:29
    #2 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x595cac in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6255:24
    #2 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a5597 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7079:18
    #2 0x5a4ae5 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6946:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x597f8f in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6497:48
    #2 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a55b1 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7080:19
    #2 0x5a4a44 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6942:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a31e6 in XmlAltoOutputDev::toUnicode(GString*, UnicodeMap*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7188:12

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x597f75 in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6497:23
    #2 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x597faa in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6497:78
    #2 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x595cac in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6255:24
    #2 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0xb23b8c in GString::fromInt(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:186:10
    #2 0x595cf3 in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6257:21
    #3 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0xb23b8c in GString::fromInt(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:186:10
    #2 0x595d4b in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6261:21
    #3 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0xb23b8c in GString::fromInt(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:186:10
    #2 0x595d4b in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6261:21
    #3 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x597f75 in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6497:23
    #2 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x597f8f in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6497:48
    #2 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x597faa in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6497:78
    #2 0x5af0b2 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7547:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0xb23b8c in GString::fromInt(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:186:10
    #2 0x547aff in TextPage::endPage(GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:1785:25

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0xb23b8c in GString::fromInt(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:186:10
    #2 0x547bff in TextPage::endPage(GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:1790:25

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a5597 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7079:18
    #2 0x5a4a44 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6942:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x595d0d in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6259:24
    #2 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0xb23b8c in GString::fromInt(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:186:10
    #2 0x595cf3 in TextPage::drawImageOrMask(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6257:21
    #3 0x5aedb4 in XmlAltoOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, int*, int, int) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7535:28

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a55b1 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7080:19
    #2 0x5a49a8 in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6938:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x59f1bd in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6783:13
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x59e604 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6689:15
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a5597 in XmlAltoOutputDev::getInfoString(Dict*, char const*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7079:18
    #2 0x5a490c in XmlAltoOutputDev::addMetadataInfo(PDFDocXrce*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6934:19
    #3 0x5292dc in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:388:17
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x518338 in operator new(unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92
    #1 0x5a750f in XmlAltoOutputDev::closeMetadataInfoDoc(GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6970:33
    #2 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 424 byte(s) in 33 object(s) allocated from:
    #0 0x5184e8 in operator new[](unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:95
    #1 0xb34fb9 in GString::resize(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:119:9

Indirect leak of 336 byte(s) in 11 object(s) allocated from:
    #0 0x5184e8 in operator new[](unsigned long) /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:95
    #1 0xb34eba in GString::resize(int) /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/GString.cc:121:10

Indirect leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff282754 in xmlNewDoc__internal_alias /home/fouzhe/my_fuzz/libxml2/tree.c:1171

Indirect leak of 120 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff283006 in xmlNewText__internal_alias /home/fouzhe/my_fuzz/libxml2/tree.c:2445

Indirect leak of 120 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff282dc0 in xmlNewNode__internal_alias /home/fouzhe/my_fuzz/libxml2/tree.c:2239

Indirect leak of 120 byte(s) in 2 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0xb378a8 in gmalloc /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/gmem.cc:140:13
    #2 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #3 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff283146 in xmlNewPropInternal /home/fouzhe/my_fuzz/libxml2/tree.c:1855

Indirect leak of 87 byte(s) in 8 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0x7fdeff2d8518 in xmlStrndup__internal_alias /home/fouzhe/my_fuzz/libxml2/xmlstring.c:45

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0xb378a8 in gmalloc /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/gmem.cc:140:13
    #2 0x5a992b in XmlAltoOutputDev::startPage(int, GfxState*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:7200:15

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e08a8 in __interceptor_malloc /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88
    #1 0xb378a8 in gmalloc /home/fouzhe/my_fuzz/pdfalto/xpdf-4.00/goo/gmem.cc:140:13
    #2 0x59fbc1 in XmlAltoOutputDev::XmlAltoOutputDev(GString*, GString*, Catalog*, int, int, GString*, GString*) /home/fouzhe/my_fuzz/pdfalto/src/XmlAltoOutputDev.cc:6852:16
    #3 0x5292c5 in main /home/fouzhe/my_fuzz/pdfalto/src/pdfalto.cc:385:22
    #4 0x7fdefdfba82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 225355 byte(s) leaked in 128 allocation(s).

grandnew avatar Sep 21 '18 08:09 grandnew

This can't be reproduced with the last release of pdfalto.

Aazhar avatar Oct 10 '18 14:10 Aazhar