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

 
 

bug #45937: memory leak in FT_New_Memory_Face/FT_Stream_OpenGzip

Submitted by:  Kostya Serebryany <kcc>
Submitted on:  Fri 11 Sep 2015 09:27:46 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.6.1

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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

H4sICmABvygnAAEAAADLCAEBCgABAAAECwCAAAMAME9TLzI99X9bAAABOAAAAE5jbWFwi9+wwAAA
A4gAAAKWZ2FzcP//AAMAADrkAAAACG9seWZZVnKYAAAHJAAAMGZoZWFkzWk+HgAAALwAAAA2aGhl
YQ3uBjYAAAD0AAAAJGhtdHhfuA3AAAABiAAAAf5sb2Nh9hfqQAAAAiAAAAECbWF4cCMBAAAADwCA
AAMAcExUU0hFXHTDAAAA/AAAAG1PUy8yULlg/QAAAWwAAABOY21hcPeatzIAAAG8AAAB+GZwIwEA
AAAPAIAAAwBwTFRTSEVcdMMAAAD8AAAAbU9TLzJQuWD9AAABbAAAAE5jbWFw95q3Z235x80cAAAD
tAAAAOlnYXNwogAXAAAJAASgAAAAEGdseWaRsiGdAAAEsAAAILRoZG14RoKxxQAAJWQAAAbIaGVh
ZMpccscAACwsAAH/CgEjAAAADwCAAAMAcExUU0hFXHTDAAAA/AAAAG1PUy8yULlg/QAAAWwAAABO
Y21hcPeatzIB/wgBKL8KJwAJASEAKekBAQEB/wgBKL8KJwH/CgACAAEAAQAAAf8IASi/CifaAAAC
AQEACjceJwG/AAAADw==

Kostya Serebryany <kcc>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Sep 2015 06:09:28 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.6.1

    Back to the top


    Powered by Savane 3.1-cleanup1