rnk wrote: > The entries in the IP2State table contain byte offsets within the instruction > stream of the function. The Windows ABI requires that these offsets are > aligned to instruction boundaries; they are not permitted to point to a byte > that is not the first byte of an instruction. > ... > Unfortunately, this violates the Windows ABI specification, which requires > that the IP2State table entries point to the boundaries between exceptions.
I'm a little defensive, since I think I came up with the label+1 scheme, but I don't believe there are any documented requirements covering the ip2state table. I do not believe I have ever seen a description of the rules for ip2state tables anywhere in any Microsoft docs. They appear to be implementation details of MSVC EH personality functions, and the requirements are simply that "exception handling works", and relevant [EH test suites](https://github.com/microsoft/compiler-tests) pass. I'm very willing to accept that this is a requirement, but I would prefer to change the language in the commit message and comments to speak more about the functional reasons why we should increase code size to get instruction-aligned label offsets, or have references to real, existing, public specifications, instead of references to an undocumented, notional "Windows ABI specification". IIRC users of IDA Pro have complained, for example, since it attempts to reconstruct EH blocks using these tables, and that's a perfectly good reason to merge a patch to implement this. I think this can be found in the issue tracker if someone looks closely. > Import Call Optimization (ICO) I guess text relocations are cool again. :) https://github.com/llvm/llvm-project/pull/144745 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits