<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - WinException: off-by-one building IP2state table"
   href="https://bugs.llvm.org/show_bug.cgi?id=46358">bug 46358</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - WinException: off-by-one building IP2state table"
   href="https://bugs.llvm.org/show_bug.cgi?id=46358#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - WinException: off-by-one building IP2state table"
   href="https://bugs.llvm.org/show_bug.cgi?id=46358">bug 46358</a>
              from <span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span></b>
        <pre>This behavior is working as intended. There is an explanation in this bug,
which is arguably a duplicate: <a href="https://llvm.org/pr47459">https://llvm.org/pr47459</a>

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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>