|
From: | Grissiom |
Subject: | Re: [ft] A suspicious memory leak in src/truetype/ttgload.c: tt_loader_init |
Date: | Sun, 31 May 2015 23:32:42 +0800 |
Hi Werner,I got some clue. The leak is caused by this piece of code in ttinterp.c:================================================/* If any errors have occurred, function tables may be broken. *//* Force a re-execution of `prep' and `fpgm' tables if no *//* bytecode debugger is run. */if ( CUR.error&& !CUR.instruction_trap&& CUR.curRange == tt_coderange_glyph ){FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error ));exc->size->bytecode_ready = -1;exc->size->cvt_ready = -1;}=================================================So if any error happened in TT_RunIns, the code only clear the ready statues but forgot to free the spaces allocated in `size`.However, the relative code is rather complicated and I could not figure out how to cleanup the `size` in a right way...
[Prev in Thread] | Current Thread | [Next in Thread] |