Fri 19 May 2006 10:56:43 AM UTC, comment #2:
Sorry for lating, proposed patch is applied.
Just I've checked that proposed patch can work well on
all of MacOS X/ppc, classic MacOS/ppc (by MPW), classic
MacOS/m68k (by MPW).
The condition the leak occurs is following:
FreeType2 tries to open MacOS file, and it looks like
resource-fork-housed fonts. Openning the stream by MacOS API,
and pass it to FreeType's font parser. FreeType's parser
finds something wrong, and give it up to open the stream
as font file. But the opened stream is not deallocated.
Making a broken font to cause such problem is a bit
troublesome, so I've tested by following experiment.
By rewinding my patch on 2005/Aug,
http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/sfnt/ttload.c?r1=1.116&r2=1.117
FreeType gets error in parsing some MacOS fonts like
"Osaka Bold", so, now "Osaka Bold" can be used to cause
the problem (looks like proper font, but error in parsing).
Building FreeType after applying proposed patch and
rewinding the part, and bind it ftoldmac in ft2demos,
and I passed "Osaka Bold" to ftoldmac, and tested if
deallocation works well. All tests for each platforms
are successfully passed.
|