diff --git a/src/setjmp/longjmp.c b/src/setjmp/longjmp.c index ca5f1e42..1b9f7c4e 100644 --- a/src/setjmp/longjmp.c +++ b/src/setjmp/longjmp.c @@ -50,7 +50,11 @@ _longjmp (jmp_buf env, int val) { if (unw_get_reg (&c, UNW_REG_SP, &sp) < 0) abort (); +#ifdef __FreeBSD__ + if (sp != wp[JB_SP] + sizeof(unw_word_t)) +#else if (sp != wp[JB_SP]) +#endif continue; if (!bsp_match (&c, wp)) diff --git a/src/setjmp/siglongjmp.c b/src/setjmp/siglongjmp.c index 49d6d9c6..da757e3c 100644 --- a/src/setjmp/siglongjmp.c +++ b/src/setjmp/siglongjmp.c @@ -53,7 +53,11 @@ siglongjmp (sigjmp_buf env, int val) { if (unw_get_reg (&c, UNW_REG_SP, &sp) < 0) abort (); +#ifdef __FreeBSD__ + if (sp != wp[JB_SP] + sizeof(unw_word_t)) +#else if (sp != wp[JB_SP]) +#endif continue; if (!bsp_match (&c, wp))