From 1add4f0d401717acc42d92600f9e85ca7d0efe11 Mon Sep 17 00:00:00 2001 From: Martin Date: Sun, 10 May 2015 12:21:22 +0200 Subject: [PATCH] HACK: be more resilient wrt. corrupt EH unwinding. This improves the situation with current LLVM master a little bit. --- src/ldc/eh2.d | 2 ++ src/test_runner.d | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/ldc/eh2.d b/src/ldc/eh2.d index ec5e5783011..6921d4e61f1 100644 --- a/src/ldc/eh2.d +++ b/src/ldc/eh2.d @@ -360,6 +360,8 @@ extern(C) EXCEPTION_DISPOSITION _d_eh_personality(EXCEPTION_RECORD *ExceptionRec size_t catch_ci_ptr; get_encoded_value(classinfo_table - ti_offset * ci_size, catch_ci_ptr, classinfo_table_encoding /*, context*/); ClassInfo catch_ci = cast(ClassInfo)cast(void*)catch_ci_ptr; + if (excobj is null) + abort(); debug(EH_personality) printf("Comparing catch %s to exception %s\n", catch_ci.name.ptr, excobj.classinfo.name.ptr); if (_d_isbaseof(excobj.classinfo, catch_ci)) { diff --git a/src/test_runner.d b/src/test_runner.d index 46584d5fe46..8640136302f 100644 --- a/src/test_runner.d +++ b/src/test_runner.d @@ -26,6 +26,7 @@ bool tester() if (auto fp = getModuleInfo(name).unitTest) { + /* try { immutable t0 = MonoTime.currTime; @@ -44,6 +45,8 @@ bool tester() cast(uint)msg.length, msg.ptr); return false; } + */ + fp(); } return true; }