2006-08-18 Jens Claudius <jens.claudius@yahoo.com>

* freetype2/src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local
	variable `_sfnt' as volatile since it must keep its value across
	a call to ft_setjmp.
	(gxv_validate): Same for local variables `memory' and `valid'.
	(classic_kern_validate): Same for local variables `memory',
	`ckern', and `valid'.

	* freetype2/src/otvalid/otvmod.c (otv_validate): Same for function
	parameter `face' and local variables `base', `gdef', `gpos', `gsub',
	`jstf', and 'valid'.

	* freetype2/src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for
	local variable `cmap'.
This commit is contained in:
Jens Claudius 2006-08-18 17:20:37 +00:00
parent 33f5f24957
commit 2652bd5412
4 changed files with 44 additions and 23 deletions

View File

@ -1,3 +1,20 @@
2006-08-18 Jens Claudius <jens.claudius@yahoo.com>
* freetype2/src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local
variable `_sfnt' as volatile since it must keep its value across
a call to ft_setjmp.
(gxv_validate): Same for local variables `memory' and `valid'.
(classic_kern_validate): Same for local variables `memory',
`ckern', and `valid'.
* freetype2/src/otvalid/otvmod.c (otv_validate): Same for function
parameter `face' and local variables `base', `gdef', `gpos', `gsub',
`jstf', and 'valid'.
* freetype2/src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for
local variable `cmap'.
2006-08-16 David Turner <david@freetype.org>
* src/cid/cidgload.c (cid_slot_load_glyph),

View File

@ -72,9 +72,9 @@
}
#define GXV_TABLE_DECL( _sfnt ) \
FT_Byte *_sfnt = NULL; \
FT_ULong len_ ## _sfnt = 0
#define GXV_TABLE_DECL( _sfnt ) \
FT_Byte* volatile _sfnt = NULL; \
FT_ULong len_ ## _sfnt = 0
#define GXV_TABLE_LOAD( _sfnt ) \
if ( ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count ) && \
@ -109,10 +109,10 @@
FT_Bytes tables[FT_VALIDATE_GX_LENGTH],
FT_UInt table_count )
{
FT_Memory memory = FT_FACE_MEMORY( face );
FT_Memory volatile memory = FT_FACE_MEMORY( face );
FT_Error error = GXV_Err_Ok;
FT_ValidatorRec valid;
FT_Error error = GXV_Err_Ok;
FT_ValidatorRec volatile valid;
FT_UInt i;
@ -191,13 +191,13 @@
FT_UInt ckern_flags,
FT_Bytes* ckern_table )
{
FT_Memory memory = FT_FACE_MEMORY( face );
FT_Memory volatile memory = FT_FACE_MEMORY( face );
FT_Byte* ckern = NULL;
FT_ULong len_ckern = 0;
FT_Byte* volatile ckern = NULL;
FT_ULong len_ckern = 0;
FT_Error error = GXV_Err_Ok;
FT_ValidatorRec valid;
FT_Error error = GXV_Err_Ok;
FT_ValidatorRec volatile valid;
*ckern_table = NULL;

View File

@ -65,18 +65,22 @@
static FT_Error
otv_validate( FT_Face face,
FT_UInt ot_flags,
FT_Bytes *ot_base,
FT_Bytes *ot_gdef,
FT_Bytes *ot_gpos,
FT_Bytes *ot_gsub,
FT_Bytes *ot_jstf )
otv_validate( FT_Face volatile face,
FT_UInt ot_flags,
FT_Bytes *ot_base,
FT_Bytes *ot_gdef,
FT_Bytes *ot_gpos,
FT_Bytes *ot_gsub,
FT_Bytes *ot_jstf )
{
FT_Error error = OTV_Err_Ok;
FT_Byte *base, *gdef, *gpos, *gsub, *jstf;
FT_ULong len_base, len_gdef, len_gpos, len_gsub, len_jstf;
FT_ValidatorRec valid;
FT_Error error = OTV_Err_Ok;
FT_Byte* volatile base;
FT_Byte* volatile gdef;
FT_Byte* volatile gpos;
FT_Byte* volatile gsub;
FT_Byte* volatile jstf;
FT_ULong len_base, len_gdef, len_gpos, len_gsub, len_jstf;
FT_ValidatorRec volatile valid;
base = gdef = gpos = gsub = jstf = NULL;

View File

@ -2273,7 +2273,7 @@
if ( offset && offset <= face->cmap_size - 2 )
{
FT_Byte* cmap = table + offset;
FT_Byte* volatile cmap = table + offset;
volatile FT_UInt format = TT_PEEK_USHORT( cmap );
const TT_CMap_Class* volatile pclazz = tt_cmap_classes;
TT_CMap_Class volatile clazz;