[PATCH] D102817: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 2

Ten Tzen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 16:30:41 PDT 2022


tentzen added a comment.
Herald added a project: All.

In D102817#3350514 <https://reviews.llvm.org/D102817#3350514>, @gmh5225 wrote:

> Code below will cause a crash.
>
>    void
>    parse()
>   {
>       throw std::exception("throw--------");
>       return;
>   }
>   
>    int
>    main()
>   {
>       try
>       {
>           parse();
>       }
>       catch (const std::exception &e)
>       {
>           printf("except=%s\n", e.what());
>           // Crash when return in catch scope
>           return -1;
>       }
>   
>       system("pause");
>       printf("end\n");
>       return 0;
>   }
>
> Seems that function 'EmitSehCppScopeEnd' in PopCleanupBlock can not find the insert point.
> CGF.Builder.GetInsertBlock() or CGF.getInvokeDest() equals nullptr.

Sorry for late reply (thank Aaron Smith for bringing this up to my attention).
Looks like there is a corner bug in Part-1 Clang FE patch (https://reviews.llvm.org/D80344), not directly related to this LLVM part.  I will look into it and work on a separate patch shortly.
thank you for trying this feature in advance.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102817/new/

https://reviews.llvm.org/D102817



More information about the llvm-commits mailing list