[LLVMbugs] [Bug 17584] New: -fms-extensions: SEH __try / __except crashes in template instantiation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 14 16:54:29 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17584

            Bug ID: 17584
           Summary: -fms-extensions: SEH __try / __except crashes in
                    template instantiation
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: david.majnemer at gmail.com, dgregor at apple.com,
                    llvmbugs at cs.uiuc.edu, timurrrr at google.com
    Classification: Unclassified

$ cat t.cpp
template <void proc()>
bool wrapped() {
  bool r = true;
  __try {
    proc();
  } __except(true) {
    r = false;
  }
  return r;
}
void crash() {
  *(volatile int*)0 = 0;
}
int main() {
  wrapped<crash>();
}

$ clang-cl t.cpp -c
Assertion failed: FilterExpr && Block, file
..\tools\clang\lib\Sema\SemaStmt.cpp, line 3147
clang-cl.exe: error: clang frontend command failed with exit code 3 (use -v to
see invocation)
clang::Sema::ActOnSEHExceptBlock()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::RebuildSEHExceptStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformSEHExceptStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformSEHHandler()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformSEHTryStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt()
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt()
clang::Sema::SubstStmt()
clang::Sema::InstantiateFunctionDefinition()
clang::Sema::PerformPendingInstantiations()
clang::Sema::ActOnEndOfTranslationUnit()
clang::Parser::ParseTopLevelDecl()
clang::ParseAST()
clang::ASTFrontendAction::ExecuteAction()
clang::CodeGenAction::ExecuteAction()
clang::FrontendAction::Execute()
clang::CompilerInstance::ExecuteAction()
clang::ExecuteCompilerInvocation()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131014/31e9f27d/attachment.html>


More information about the llvm-bugs mailing list