--- old/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2014-05-13 23:15:19.000000000 -0700 +++ new/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2014-05-13 23:15:19.000000000 -0700 @@ -56,6 +56,12 @@ #undef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) +#ifdef __APPLE__ +/* use setjmp/longjmp versions that do not save/restore the signal mask */ +#define setjmp _setjmp +#define longjmp _longjmp +#endif + /* Cached Java method ids */ static jmethodID JPEGImageReader_readInputDataID; static jmethodID JPEGImageReader_skipInputBytesID; --- old/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2014-05-13 23:15:20.000000000 -0700 +++ new/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2014-05-13 23:15:20.000000000 -0700 @@ -47,6 +47,12 @@ #include #include "jerror.h" +#ifdef __APPLE__ +/* use setjmp/longjmp versions that do not save/restore the signal mask */ +#define setjmp _setjmp +#define longjmp _longjmp +#endif + /* The method IDs we cache. Note that the last two belongs to the * java.io.InputStream class. */ --- old/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c 2014-05-13 23:15:21.000000000 -0700 +++ new/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c 2014-05-13 23:15:21.000000000 -0700 @@ -30,6 +30,12 @@ #include +#ifdef __APPLE__ +/* use setjmp/longjmp versions that do not save/restore the signal mask */ +#define setjmp _setjmp +#define longjmp _longjmp +#endif + /* stream input handling */ typedef struct --- old/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2014-05-13 23:15:23.000000000 -0700 +++ new/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2014-05-13 23:15:22.000000000 -0700 @@ -71,7 +71,12 @@ goto done; } +#ifdef __APPLE__ + /* use setjmp/longjmp versions that do not save/restore the signal mask */ + if (_setjmp(png_set_longjmp_fn(png_ptr, _longjmp, sizeof(jmp_buf)))) { +#else if (setjmp(png_jmpbuf(png_ptr))) { +#endif goto done; }