https://bug385583.bugzilla.mozilla.org/attachment.cgi?id=347009 https://bugzilla.mozilla.org/show_bug.cgi?id=385583 Fix: NSPR makes incorrect assumptions about jmp_buf on ARM EABI systems See also: http://www.mail-archive.com/debian-arm@lists.debian.org/msg06589.html Index: mozilla/nsprpub/pr/include/md/_linux.h =================================================================== RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_linux.h,v retrieving revision 3.52 diff -u -p -8 -r3.52 _linux.h --- mozilla/nsprpub/pr/include/md/_linux.h 11 Oct 2008 15:26:22 -0000 3.52 +++ mozilla/nsprpub/pr/include/md/_linux.h 8 Nov 2008 01:22:46 -0000 @@ -412,21 +412,31 @@ extern void _MD_CleanupBeforeExit(void); #define _MD_SP_TYPE __ptr_t #else #error "Linux/MIPS pre-glibc2 not supported yet" #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ #elif defined(__arm__) /* ARM/Linux */ #if defined(__GLIBC__) && __GLIBC__ >= 2 +#ifdef __ARM_EABI__ +/* EABI */ +#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[8] +#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[7] = (val)) +#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[7]) +#define _MD_SP_TYPE __ptr_t +#else /* __ARM_EABI__ */ +/* old ABI */ #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20] #define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[19] = (val)) #define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t)) #define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[19]) #define _MD_SP_TYPE __ptr_t +#endif /* __ARM_EABI__ */ #else #error "ARM/Linux pre-glibc2 not supported yet" #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */ #else #error "Unknown CPU architecture"