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

Rafal Kupiec via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 22:04:13 PDT 2022


belliash added a comment.

In D102817#3457704 <https://reviews.llvm.org/D102817#3457704>, @tentzen wrote:

> 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.

What is the current status of this fix?


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