bugThe FreeType Project - Bugs: bug #45937, memory leak in...


You are not allowed to post comments on this tracker with your current authentication level.

bug #45937: memory leak in FT_New_Memory_Face/FT_Stream_OpenGzip

Submitter:  Kostya Serebryany <kcc>
Submitted:  Fri 11 Sep 2015 09:27:46 PM UTC
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.6.1

Sun 13 Sep 2015 06:09:28 AM UTC, comment #1: 

Fixed in git, thanks!  Your bug report unveiled a serious defect in handling small, compressed PCF files: An important speed optimization was never executed.

Werner LEMBERG <wl>
Group administrator
Fri 11 Sep 2015 09:27:46 PM UTC, original submission:  

found on fresh git with libFuzzer+AddressSanitizer

Feed the data below (base64-encoded) into FT_New_Memory_Face
and you will see a memory leak (can see it with valgrind too)

==29035==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 15 byte(s) in 1 object(s) allocated from:
    #0 0x4abe2b in malloc /usr/local/google/home/kcc/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3
    #1 0x4d7e89 in ft_mem_qalloc src/base/ftutil.c:76:15
    #2 0x4d7e89 in ft_mem_alloc src/base/ftutil.c:55
    #3 0x616c98 in FT_Stream_OpenGzip src/gzip/ftgzip.c:657:15
    #4 0x595fa3 in PCF_Face_Init src/pcf/pcfdrivr.c:289:18
    #5 0x4df044 in open_face src/base/ftobjs.c:1166:15
    #6 0x4ddb7f in FT_Open_Face src/base/ftobjs.c:2156:19
    #7 0x4decdc in FT_New_Memory_Face src/base/ftobjs.c:1256:12


Kostya Serebryany <kcc>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by kcc (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-13 wl StatusNone Fixed
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.6.1

    Back to the top

    Powered by Savane 3.13-4e86.
    Corresponding source code