[llvm-bugs] [Bug 46358] WinException: off-by-one building IP2state table
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 27 13:34:21 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46358
Reid Kleckner <rnk at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Reid Kleckner <rnk at google.com> ---
This behavior is working as intended. There is an explanation in this bug,
which is arguably a duplicate: https://llvm.org/pr47459
The PCs in the ip2state table form half-open intervals, but a label beginning a
new region may appear immediately after a CALL instruction belonging to an
earlier region. When an exception is thrown from a CALL instruction, the return
address is used to calculate the current EH state, and the return address may
be in the next EH state interval. To work around this, LLVM biases all the
entries in ip2state forward by one byte. An alternative solution would be to
insert nops before EH state transitions, but that costs code size. The nop
placement could be more sophisticated, but that has its own complexity costs.
I left the other bug open to cover the possibility that we implement the
sophisticated nop insertion in the future, but I don't consider it high
priority.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201027/d7c4a0cb/attachment.html>
More information about the llvm-bugs
mailing list