diff options
Diffstat (limited to 'debian/patches/libjava-sjlj.diff')
-rw-r--r-- | debian/patches/libjava-sjlj.diff | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/libjava-sjlj.diff b/debian/patches/libjava-sjlj.diff new file mode 100644 index 0000000..f16f695 --- /dev/null +++ b/debian/patches/libjava-sjlj.diff @@ -0,0 +1,40 @@ +# DP: Don't try to use _Unwind_Backtrace on SJLJ targets. +# DP: See bug #387875, #388505, GCC PR 29206. + +--- + libjava/sysdep/generic/backtrace.h | 17 +++++++++++++++++ + 1 files changed, 17 insertions(+), 0 deletions(-) + +Index: b/src/libjava/sysdep/generic/backtrace.h +=================================================================== +--- a/src/libjava/sysdep/generic/backtrace.h ++++ b/src/libjava/sysdep/generic/backtrace.h +@@ -13,6 +13,20 @@ details. */ + + #include <java-stack.h> + ++#ifdef SJLJ_EXCEPTIONS ++ ++#undef _Unwind_GetIPInfo ++#define _Unwind_GetIPInfo(ctx,ip_before_insn) \ ++ (abort (), (void) (ctx), *ip_before_insn = 1, 0) ++ ++#undef _Unwind_GetRegionStart ++#define _Unwind_GetRegionStart(ctx) \ ++ (abort (), (void) (ctx), 0) ++ ++#undef _Unwind_Backtrace ++#define _Unwind_Backtrace(trace_fn,state_ptr) \ ++ (fallback_backtrace (trace_fn, state_ptr)) ++ + /* Unwind through the call stack calling TRACE_FN with STATE for every stack + frame. Returns the reason why the unwinding was stopped. */ + _Unwind_Reason_Code +@@ -20,4 +34,7 @@ fallback_backtrace (_Unwind_Trace_Fn, _J + { + return _URC_NO_REASON; + } ++ ++#endif /* SJLJ_EXCEPTIONS */ ++ + #endif |