From fd987ef9bb94dec34ccc7783f62887d4e5d4ec51 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Mon, 29 Mar 2004 23:38:58 +0000 Subject: [PATCH] Move setjump_buffer to the beginning of the structure, to make sure it is 2004-03-29 Manish Singh * plug-ins/common/jpeg.c (struct my_error_mgr): Move setjump_buffer to the beginning of the structure, to make sure it is aligned on a 16-byte boundary for ia64, even with icc. Fixes #138357. --- ChangeLog | 6 ++++++ plug-ins/common/jpeg.c | 9 +++++++-- plug-ins/jpeg/jpeg-load.c | 9 +++++++-- plug-ins/jpeg/jpeg-load.h | 9 +++++++-- plug-ins/jpeg/jpeg-save.c | 9 +++++++-- plug-ins/jpeg/jpeg-save.h | 9 +++++++-- plug-ins/jpeg/jpeg.c | 9 +++++++-- plug-ins/jpeg/jpeg.h | 9 +++++++-- 8 files changed, 55 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 885ac1667e..482a3964e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-03-29 Manish Singh + + * plug-ins/common/jpeg.c (struct my_error_mgr): Move setjump_buffer + to the beginning of the structure, to make sure it is aligned on a + 16-byte boundary for ia64, even with icc. Fixes #138357. + 2004-03-29 Sven Neumann * app/config/gimpguiconfig.c: changed the default for "help-locales" diff --git a/plug-ins/common/jpeg.c b/plug-ins/common/jpeg.c index 7c8748aafd..16d91824ea 100644 --- a/plug-ins/common/jpeg.c +++ b/plug-ins/common/jpeg.c @@ -700,9 +700,14 @@ COM_handler (j_decompress_ptr cinfo) typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - + /* This field should be first to guarantee proper alignment of the + * setjmp_buffer on all platforms. Specifically, on linux ia64 this + * needs to be 16-byte aligned and some glibc/icc combinations don't + * guarantee this. See bug #138357 for details. + */ jmp_buf setjmp_buffer; /* for return to caller */ + + struct jpeg_error_mgr pub; /* "public" fields */ } *my_error_ptr; /* diff --git a/plug-ins/jpeg/jpeg-load.c b/plug-ins/jpeg/jpeg-load.c index 7c8748aafd..16d91824ea 100644 --- a/plug-ins/jpeg/jpeg-load.c +++ b/plug-ins/jpeg/jpeg-load.c @@ -700,9 +700,14 @@ COM_handler (j_decompress_ptr cinfo) typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - + /* This field should be first to guarantee proper alignment of the + * setjmp_buffer on all platforms. Specifically, on linux ia64 this + * needs to be 16-byte aligned and some glibc/icc combinations don't + * guarantee this. See bug #138357 for details. + */ jmp_buf setjmp_buffer; /* for return to caller */ + + struct jpeg_error_mgr pub; /* "public" fields */ } *my_error_ptr; /* diff --git a/plug-ins/jpeg/jpeg-load.h b/plug-ins/jpeg/jpeg-load.h index 7c8748aafd..16d91824ea 100644 --- a/plug-ins/jpeg/jpeg-load.h +++ b/plug-ins/jpeg/jpeg-load.h @@ -700,9 +700,14 @@ COM_handler (j_decompress_ptr cinfo) typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - + /* This field should be first to guarantee proper alignment of the + * setjmp_buffer on all platforms. Specifically, on linux ia64 this + * needs to be 16-byte aligned and some glibc/icc combinations don't + * guarantee this. See bug #138357 for details. + */ jmp_buf setjmp_buffer; /* for return to caller */ + + struct jpeg_error_mgr pub; /* "public" fields */ } *my_error_ptr; /* diff --git a/plug-ins/jpeg/jpeg-save.c b/plug-ins/jpeg/jpeg-save.c index 7c8748aafd..16d91824ea 100644 --- a/plug-ins/jpeg/jpeg-save.c +++ b/plug-ins/jpeg/jpeg-save.c @@ -700,9 +700,14 @@ COM_handler (j_decompress_ptr cinfo) typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - + /* This field should be first to guarantee proper alignment of the + * setjmp_buffer on all platforms. Specifically, on linux ia64 this + * needs to be 16-byte aligned and some glibc/icc combinations don't + * guarantee this. See bug #138357 for details. + */ jmp_buf setjmp_buffer; /* for return to caller */ + + struct jpeg_error_mgr pub; /* "public" fields */ } *my_error_ptr; /* diff --git a/plug-ins/jpeg/jpeg-save.h b/plug-ins/jpeg/jpeg-save.h index 7c8748aafd..16d91824ea 100644 --- a/plug-ins/jpeg/jpeg-save.h +++ b/plug-ins/jpeg/jpeg-save.h @@ -700,9 +700,14 @@ COM_handler (j_decompress_ptr cinfo) typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - + /* This field should be first to guarantee proper alignment of the + * setjmp_buffer on all platforms. Specifically, on linux ia64 this + * needs to be 16-byte aligned and some glibc/icc combinations don't + * guarantee this. See bug #138357 for details. + */ jmp_buf setjmp_buffer; /* for return to caller */ + + struct jpeg_error_mgr pub; /* "public" fields */ } *my_error_ptr; /* diff --git a/plug-ins/jpeg/jpeg.c b/plug-ins/jpeg/jpeg.c index 7c8748aafd..16d91824ea 100644 --- a/plug-ins/jpeg/jpeg.c +++ b/plug-ins/jpeg/jpeg.c @@ -700,9 +700,14 @@ COM_handler (j_decompress_ptr cinfo) typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - + /* This field should be first to guarantee proper alignment of the + * setjmp_buffer on all platforms. Specifically, on linux ia64 this + * needs to be 16-byte aligned and some glibc/icc combinations don't + * guarantee this. See bug #138357 for details. + */ jmp_buf setjmp_buffer; /* for return to caller */ + + struct jpeg_error_mgr pub; /* "public" fields */ } *my_error_ptr; /* diff --git a/plug-ins/jpeg/jpeg.h b/plug-ins/jpeg/jpeg.h index 7c8748aafd..16d91824ea 100644 --- a/plug-ins/jpeg/jpeg.h +++ b/plug-ins/jpeg/jpeg.h @@ -700,9 +700,14 @@ COM_handler (j_decompress_ptr cinfo) typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - + /* This field should be first to guarantee proper alignment of the + * setjmp_buffer on all platforms. Specifically, on linux ia64 this + * needs to be 16-byte aligned and some glibc/icc combinations don't + * guarantee this. See bug #138357 for details. + */ jmp_buf setjmp_buffer; /* for return to caller */ + + struct jpeg_error_mgr pub; /* "public" fields */ } *my_error_ptr; /*