aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2011-06-27 21:09:01 +0200
committerMike Pall <mike>2011-06-27 21:09:01 +0200
commit999d95253ab3770ca406bbc12e62aec029095239 (patch)
tree0d722afc93397779bba78f9f34d239c30c6dee04 /src
parent2dd52500ab9e7b1a695723d01b481fe87aa88215 (diff)
downloadluajit-999d95253ab3770ca406bbc12e62aec029095239.tar.gz
luajit-999d95253ab3770ca406bbc12e62aec029095239.tar.bz2
luajit-999d95253ab3770ca406bbc12e62aec029095239.zip
Fix forced unwinding triggered by external unwinder.
Diffstat (limited to 'src')
-rw-r--r--src/lj_err.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_err.c b/src/lj_err.c
index c75552df..0c495d43 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -228,7 +228,9 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
228 } 228 }
229#if LJ_UNWIND_EXT 229#if LJ_UNWIND_EXT
230 cf = err_unwind(L, cf, errcode); 230 cf = err_unwind(L, cf, errcode);
231 if (cf) { 231 if ((actions & _UA_FORCE_UNWIND)) {
232 return _URC_CONTINUE_UNWIND;
233 } else if (cf) {
232 _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode); 234 _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode);
233 _Unwind_SetIP(ctx, (_Unwind_Ptr)(cframe_unwind_ff(cf) ? 235 _Unwind_SetIP(ctx, (_Unwind_Ptr)(cframe_unwind_ff(cf) ?
234 lj_vm_unwind_ff_eh : 236 lj_vm_unwind_ff_eh :
@@ -280,7 +282,7 @@ LJ_FUNCA _Unwind_Reason_Code lj_err_unwind_arm(_Unwind_State state,
280 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); 282 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP));
281 return _URC_HANDLER_FOUND; 283 return _URC_HANDLER_FOUND;
282 } 284 }
283 if ((state & _US_ACTION_MASK) == _US_UNWIND_FRAME_STARTING) { 285 if ((state&(_US_ACTION_MASK|_US_FORCE_UNWIND)) == _US_UNWIND_FRAME_STARTING) {
284 _Unwind_DeleteException(ucb); 286 _Unwind_DeleteException(ucb);
285 _Unwind_SetGR(ctx, 15, (_Unwind_Word)(void *)lj_err_throw); 287 _Unwind_SetGR(ctx, 15, (_Unwind_Word)(void *)lj_err_throw);
286 _Unwind_SetGR(ctx, 0, (_Unwind_Word)L); 288 _Unwind_SetGR(ctx, 0, (_Unwind_Word)L);