Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150935 - freetype-2.1.10-r2 : bindist patch cause serious memory leaks in libSDL
Summary: freetype-2.1.10-r2 : bindist patch cause serious memory leaks in libSDL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Normal major (vote)
Assignee: foser (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 173804
Blocks:
  Show dependency tree
 
Reported: 2006-10-11 15:50 UTC by Vincent Le Ligeour
Modified: 2007-07-01 21:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Short example showing the memory leak (test.cpp,1.90 KB, text/x-c++src)
2006-10-11 15:52 UTC, Vincent Le Ligeour
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Le Ligeour 2006-10-11 15:50:23 UTC
The following line in freetype-2.1.10-r2.ebuild :
 use bindist || append-flags -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
cause memory leak in SDL_Render{UTF8|Text_* functions (example provided in attachement).
Haven't track at all the 37 points where it appears in the sources.
Comment 1 Vincent Le Ligeour 2006-10-11 15:52:48 UTC
Created attachment 99391 [details]
Short example showing the memory leak
Comment 2 Vincent Le Ligeour 2006-10-12 03:58:28 UTC
In the example if I replace the 
 TTF_RenderText_Blended(font, my_order , black);
by
 TTF_RenderText_Blended(font, "my_order" , black);
the memory leak disappears
Comment 3 Vincent Le Ligeour 2006-10-13 15:08:07 UTC
My fault, I've misstracked the bug (was 4 AM)
the bug is located in freetype-2.1.10-security_batch-r1.patch
Comment 4 foser (RETIRED) gentoo-dev 2006-12-04 09:15:19 UTC
Is it in the security batch in combination with enabling or disabling the autohinter (or both) ?

Since the security patches really is a combination of 2.1.10 with 2.2 I do not doubt it's not very clean code. I think this is one more reason to make 2.2 stable soon.
Comment 5 Vincent Le Ligeour 2006-12-04 15:34:52 UTC
(In reply to comment #4)
> Is it in the security batch in combination with enabling or disabling the
> autohinter (or both) ?

Leak appens when both security batch AND bindist are enabled (as far as I remember) (should be checked again with the example attached in Comment #1).

Comment 6 Ryan Hill (RETIRED) gentoo-dev 2007-07-01 21:28:54 UTC
all archs now have freetype-2.3 stable.