[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Fwd: Re: Freetype 2.5 crash on windows 64 bit executable
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Fwd: Re: Freetype 2.5 crash on windows 64 bit executable |
Date: |
Tue, 22 Apr 2014 08:05:10 +0200 (CEST) |
Sorry for the late reply. Hopefully, you still have the buggy
compiler for testing purposes...
> I would do it gladly, but I do not fully understand, how to do it
> correctly (because I do not understand why it should help). Should
> I do a copy of a buffer before each call of "ft_setjmp" and
> "ft_longjmp" ?
Please try the attached patch. It moves the jump buffer to the very
beginning of the structure, thus it should get automatically aligned
to whatever the compiler uses for local variables.
Werner
--- ./include/internal/ftvalid.h 2014-04-20 18:18:50.469380791 +0200
+++ ./include/internal/ftvalid.h.new 2014-04-22 07:56:39.790119658 +0200
@@ -87,13 +87,13 @@
/* validator structure */
typedef struct FT_ValidatorRec_
{
+ ft_jmp_buf jump_buffer; /* used for exception handling */
+
const FT_Byte* base; /* address of table in memory */
const FT_Byte* limit; /* `base' + sizeof(table) in memory */
FT_ValidationLevel level; /* validation level */
FT_Error error; /* error returned. 0 means success */
- ft_jmp_buf jump_buffer; /* used for exception handling */
-
} FT_ValidatorRec;
#if defined( _MSC_VER )
--- ./src/smooth/ftgrays.c 2014-04-20 18:18:50.537379941 +0200
+++ ./src/smooth/ftgrays.c.new 2014-04-22 07:58:30.740732584 +0200
@@ -405,6 +405,8 @@
typedef struct gray_TWorker_
{
+ ft_jmp_buf jump_buffer;
+
TCoord ex, ey;
TPos min_ex, max_ex;
TPos min_ey, max_ey;
@@ -440,8 +442,6 @@
int band_size;
int band_shoot;
- ft_jmp_buf jump_buffer;
-
void* buffer;
long buffer_size;