theraven added a comment.

In https://reviews.llvm.org/D47233#1129810, @DHowett-MSFT wrote:
> We ran into some critical issues with this approach on x64. The pointers in 
> the exception record are supposed to be image-relative instead of absolute, 
> so I tried to make them absolute to libobjc2's load address, but I never 
> quite solved it.
>
> A slightly better-documented and cleaner version of the code you linked is 
> here 
> <https://github.com/Microsoft/libobjc2/blob/upstream-staging/eh_win32_msvc.cc>.


(For the reference of other people, since Dustin and I discussed this offline a 
while back)

This is fixed upstream.  We use a stack address as our base address and 
construct stack-variable-relative offsets.  This is safe to do because the only 
requirement for Win64 EH is that the pointers be relative to some arbitrary 
base and in the SEH model the throwing stack frame remains live until the last 
catch.


Repository:
  rC Clang

https://reviews.llvm.org/D47233



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D47233: [CodeGen] E... David Chisnall via Phabricator via cfe-commits

Reply via email to