Skip to content

Commit

Permalink
HACK: be more resilient wrt. corrupt EH unwinding.
Browse files Browse the repository at this point in the history
This improves the situation with current LLVM master a little bit.
  • Loading branch information
kinke committed May 10, 2015
1 parent 56aeae8 commit 1add4f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ldc/eh2.d
Expand Up @@ -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))
{
Expand Down
3 changes: 3 additions & 0 deletions src/test_runner.d
Expand Up @@ -26,6 +26,7 @@ bool tester()

if (auto fp = getModuleInfo(name).unitTest)
{
/*
try
{
immutable t0 = MonoTime.currTime;
Expand All @@ -44,6 +45,8 @@ bool tester()
cast(uint)msg.length, msg.ptr);
return false;
}
*/
fp();
}
return true;
}
Expand Down

0 comments on commit 1add4f0

Please sign in to comment.