diff options
Diffstat (limited to 'src/lj_err.c')
-rw-r--r-- | src/lj_err.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lj_err.c b/src/lj_err.c index 7f9db600..f5d7b10d 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
@@ -577,6 +577,16 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions, | |||
577 | lj_vm_unwind_c_eh)); | 577 | lj_vm_unwind_c_eh)); |
578 | return _URC_INSTALL_CONTEXT; | 578 | return _URC_INSTALL_CONTEXT; |
579 | } | 579 | } |
580 | #if LJ_TARGET_X86ORX64 | ||
581 | else if ((actions & _UA_HANDLER_FRAME)) { | ||
582 | /* Workaround for ancient libgcc bug. Still present in RHEL 5.5. :-/ | ||
583 | ** Real fix: http://gcc.gnu.org/viewcvs/trunk/gcc/unwind-dw2.c?r1=121165&r2=124837&pathrev=153877&diff_format=h | ||
584 | */ | ||
585 | _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode); | ||
586 | _Unwind_SetIP(ctx, (_Unwind_Ptr)lj_vm_unwind_rethrow); | ||
587 | return _URC_INSTALL_CONTEXT; | ||
588 | } | ||
589 | #endif | ||
580 | #else | 590 | #else |
581 | /* This is not the proper way to escape from the unwinder. We get away with | 591 | /* This is not the proper way to escape from the unwinder. We get away with |
582 | ** it on x86/PPC because the interpreter restores all callee-saved regs. | 592 | ** it on x86/PPC because the interpreter restores all callee-saved regs. |