freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

severe memory leak due to recent t42 change


From: Werner LEMBERG
Subject: severe memory leak due to recent t42 change
Date: Sat, 12 Jun 2021 11:53:29 +0000 (UTC)

Hello Alexei,


your recent t42 change causes memory leaks.  If you build the `driver`
program from 'freetype2-testing' without sanitizers and with FreeType
debugging activated, a call to

  valgrind --leak-check=full \
           --show-leak-kinds=all \
    freetype2-testing/fuzzing/build/bin/driver \
      --type42-render \
      fuzzing/corpora/type42/bungeman/HangingS.t42

for example gives

 33,993 bytes in 4 blocks are definitely lost in loss record 6 of 6
    at 0x4C2F655: malloc (vg_replace_malloc.c:380)
    by 0x633050: ft_alloc (ftsystem.c:113)
    by 0x4F841C: ft_mem_qrealloc (ftutil.c:145)
    by 0x4DFFB3: ft_mem_realloc (ftutil.c:101)
    by 0x5E81AA: ft_smooth_render (ftsmooth.c:475)
    by 0x4ECE7C: FT_Render_Glyph_Internal (ftobjs.c:4683)
    by 0x4E46D3: FT_Render_Glyph (ftobjs.c:4838)
    ...

FreeType's memory debugger sees this, too.  A call to

  FT2_DEBUG_MEMORY=1 \
  fuzzing/build/bin/driver \
    --type42-render \
    fuzzing/corpora/type42/bungeman/HangingS.t42

yields

  leaked memory block at address 0x290f670, size      234
    in 
(/home/wl/git/freetype/freetype2-testing/external/freetype2/src/smooth/ftsmooth.c:475)
  leaked memory block at address 0x290d5e0, size       54
    in 
(/home/wl/git/freetype/freetype2-testing/external/freetype2/src/smooth/ftsmooth.c:475)
  leaked memory block at address 0x2903360, size    33264
    in 
(/home/wl/git/freetype/freetype2-testing/external/freetype2/src/smooth/ftsmooth.c:475)
  leaked memory block at address 0x290f3c0, size      441
    in 
(/home/wl/git/freetype/freetype2-testing/external/freetype2/src/smooth/ftsmooth.c:475)

Please fix this!


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]