<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - array to pointer decay inside seh except block leads crash"
   href="https://bugs.llvm.org/show_bug.cgi?id=34803">34803</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>array to pointer decay inside seh except block leads crash
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>comicfans44@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>following code leads crash


 int exp(const char* FunctionName)
 {
  return 0;
 }


 bool call()
 {
  __try
  {

   return true;
  }
  __except( exp( __FUNCTION__) )
  {

   return false;
  }
 }


 int main(int , char**){

 return 0;
 }







clang crash stack shows:
        cl.exe!llvm::isa_impl_cl<clang::BlockDecl,clang::Decl const
*>::doit(const clang::Decl * Val) line 106  
        cl.exe!llvm::isa_impl_wrap<clang::BlockDecl,clang::Decl const
*,clang::Decl const *>::doit(const clang::Decl * const & Val) line 133    
        cl.exe!llvm::isa_impl_wrap<clang::BlockDecl,clang::Decl const *
const,clang::Decl const *>::doit(const clang::Decl * const & Val) line 123      
        cl.exe!llvm::isa<clang::BlockDecl,clang::Decl const *>(const
clang::Decl * const & Val) line 143        
        cl.exe!llvm::dyn_cast<clang::BlockDecl,clang::Decl const >(const
clang::Decl * Val) line 334    
        cl.exe!clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(const
clang::PredefinedExpr * E) line 2531 
        cl.exe!clang::CodeGen::CodeGenFunction::EmitLValue(const clang::Expr *
E) line 1137     
        cl.exe!clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(const
clang::Expr * E, clang::CodeGen::LValueBaseInfo * BaseInfo) line 3064     
        cl.exe!`anonymous
namespace'::ScalarExprEmitter::VisitCastExpr(clang::CastExpr * CE) line 1685  
        cl.exe!clang::StmtVisitorBase<clang::make_ptr,`anonymous
namespace'::ScalarExprEmitter,llvm::Value
*>::VisitImplicitCastExpr(clang::ImplicitCastExpr * S) line 423      
        cl.exe!clang::StmtVisitorBase<clang::make_ptr,`anonymous
namespace'::ScalarExprEmitter,llvm::Value *>::Visit(clang::Stmt * S) line 423  
        cl.exe!`anonymous namespace'::ScalarExprEmitter::Visit(clang::Expr * E)
line 358        
        cl.exe!clang::CodeGen::CodeGenFunction::EmitScalarExpr(const
clang::Expr * E, bool IgnoreResultAssign) line 3821        
        cl.exe!clang::CodeGen::CodeGenFunction::EmitAnyExpr(const clang::Expr *
E, clang::CodeGen::AggValueSlot aggSlot, bool ignoreResult) line 175    
        cl.exe!clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(const
clang::Expr * E) line 194       
       
cl.exe!clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList
& args, const clang::Expr * E, clang::QualType type) line 3535  
       
cl.exe!clang::CodeGen::CodeGenFunction::EmitCallArgs(clang::CodeGen::CallArgList
& Args, llvm::ArrayRef<clang::QualType> ArgTypes,
llvm::iterator_range<clang::Stmt::ConstExprIterator> ArgRange,
clang::CodeGen::CodeGenFunction::AbstractCallee AC, unsigned int ParamsToSkip,
clang::CodeGen::CodeGenFunction::EvaluationOrder Order) line 3412      
       
cl.exe!clang::CodeGen::CodeGenFunction::EmitCallArgs<clang::FunctionProtoType>(clang::CodeGen::CallArgList
& Args, const clang::FunctionProtoType * CallArgTypeInfo,
llvm::iterator_range<clang::Stmt::ConstExprIterator> ArgRange,
clang::CodeGen::CodeGenFunction::AbstractCallee AC, unsigned int ParamsToSkip,
clang::CodeGen::CodeGenFunction::EvaluationOrder Order) line 3831    
        cl.exe!clang::CodeGen::CodeGenFunction::EmitCall(clang::QualType
CalleeType, const clang::CodeGen::CGCallee & OrigCallee, const clang::CallExpr
* E, clang::CodeGen::ReturnValueSlot ReturnValue, llvm::Value * Chain) line
4522        
        cl.exe!clang::CodeGen::CodeGenFunction::EmitCallExpr(const
clang::CallExpr * E, clang::CodeGen::ReturnValueSlot ReturnValue) line 4141  
        cl.exe!`anonymous namespace'::ScalarExprEmitter::VisitCallExpr(const
clang::CallExpr * E) line 517      
        cl.exe!clang::StmtVisitorBase<clang::make_ptr,`anonymous
namespace'::ScalarExprEmitter,llvm::Value *>::Visit(clang::Stmt * S) line 329  
        cl.exe!`anonymous namespace'::ScalarExprEmitter::Visit(clang::Expr * E)
line 358        
        cl.exe!clang::CodeGen::CodeGenFunction::EmitScalarExpr(const
clang::Expr * E, bool IgnoreResultAssign) line 3821        
       
cl.exe!clang::CodeGen::CodeGenFunction::GenerateSEHFilterFunction(clang::CodeGen::CodeGenFunction
& ParentCGF, const clang::SEHExceptStmt & Except) line 1697   
        cl.exe!clang::CodeGen::CodeGenFunction::EnterSEHTryStmt(const
clang::SEHTryStmt & S) line 1815  
        cl.exe!clang::CodeGen::CodeGenFunction::EmitSEHTryStmt(const
clang::SEHTryStmt & S) line 1404   
        cl.exe!clang::CodeGen::CodeGenFunction::EmitStmt(const clang::Stmt * S,
llvm::ArrayRef<clang::Attr const *> Attrs) line 185     
       
cl.exe!clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(const
clang::CompoundStmt & S, bool GetLast, clang::CodeGen::AggValueSlot AggSlot)
line 381        
       
cl.exe!clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList
& Args, const clang::Stmt * Body) line 1122    
        cl.exe!clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl
GD, llvm::Function * Fn, const clang::CodeGen::CGFunctionInfo & FnInfo) line
1287        
       
cl.exe!clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl
GD, llvm::GlobalValue * GV) line 3248      
       
cl.exe!clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl
GD, llvm::GlobalValue * GV) line 2024      
        cl.exe!clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl GD)
line 1801        
        cl.exe!clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl * D)
line 3990       
        cl.exe!`anonymous
namespace'::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef DG) line
160    
        cl.exe!clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef
D) line 168       
        cl.exe!clang::ParseAST(clang::Sema & S, bool PrintStats, bool
SkipFunctionBodies) line 151      
        cl.exe!clang::ASTFrontendAction::ExecuteAction() line 998       
        cl.exe!clang::CodeGenAction::ExecuteAction() line 1024  
        cl.exe!clang::FrontendAction::Execute() line 897        
        cl.exe!clang::CompilerInstance::ExecuteAction(clang::FrontendAction &
Act) line 991     
        cl.exe!clang::ExecuteCompilerInvocation(clang::CompilerInstance *
Clang) line 252       
        cl.exe!cc1_main(llvm::ArrayRef<char const *> Argv, const char * Argv0,
void * MainAddr) line 221        
        cl.exe!ExecuteCC1Tool(llvm::ArrayRef<char const *> argv,
llvm::StringRef Tool) line 309 
        cl.exe!main(int argc_, const char * * argv_) line 388   





finally in CGExpr.cpp:2531 
LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) {
...
if (auto *BD= dyn_cast<BlockDecl>(CurCodeDecl))
but CurCodeDecl is NULL

this CodeGenFunction is created at CGException.cpp:1782

void CodeGenFunction::EnterSEHTryStmt(const SEHTryStmt &S) {
  CodeGenFunction HelperCGF(CGM, /*suppressNewContext=*/true);</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>