[llvm] r224625 - Add the ExceptionHandling::MSVC enumeration

Kaylor, Andrew andrew.kaylor at intel.com
Tue Jan 13 17:50:16 PST 2015

What I’m seeing is that a landing pad instruction using __gcc_personality_v0 is generated for the CodeGen/X86/GC/alloc_loop.ll test case.  The landing pad instruction is in the gc_cleanup block after the (GCStrategy.cpp) LowerIntrinsics pass.  My outlining patch adds the MSVCEHPrepare pass, which was flagging the presence of this personality function as an error.

If I just ignore the landing pad containing that personality function (or if my pass is never called), the gc_cleanup block eventually gets removed by the UnreachableBlockElim pass.

So I can easily avoid the test failure, but it seems like something is wrong here.


From: Reid Kleckner [mailto:rnk at google.com]
Sent: Tuesday, January 13, 2015 4:56 PM
To: Kaylor, Andrew
Cc: Reid Kleckner; llvm-commits at cs.uiuc.edu
Subject: Re: [llvm] r224625 - Add the ExceptionHandling::MSVC enumeration

On Fri, Jan 9, 2015 at 11:02 AM, Kaylor, Andrew <andrew.kaylor at intel.com<mailto:andrew.kaylor at intel.com>> wrote:
Hi Reid,

I just discovered that ShadowStackGC inserts landing pad instructions that use __gcc_personality_v0 without checking the exception handling type setting.  It seems clear that ShadowStackGC needs to be updated, and I wonder if as a result of your changes below GC isn't in a broken state on Windows with the MSVC environment.  I'm not sure if that's even a supported combination right now, but it seems like we should at least include something in our planning to get this fixed.

I guess ShadowStackGC crashes now rather than silently referencing a personality function that doesn't generally exist on the target? We should try not to crash, but that never would have worked.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150114/9f0bba64/attachment.html>

More information about the llvm-commits mailing list