<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 FIXED - clang-cl producing crashing executable due to exception handling"
   href="https://llvm.org/bugs/show_bug.cgi?id=25533">bug 25533</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;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>rnk@google.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - clang-cl producing crashing executable due to exception handling"
   href="https://llvm.org/bugs/show_bug.cgi?id=25533#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - clang-cl producing crashing executable due to exception handling"
   href="https://llvm.org/bugs/show_bug.cgi?id=25533">bug 25533</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>Thanks for the report. I broke this in r253059.

What happened was we had a function that:
- Used no callee-saved registers (because -O0)
- Used the C++ personality function
- Did not have any EH pads

We have logic that allocates an UnwindHelp fixed stack object and initializes
it to -2. That logic was checking for the MSVC C++ EH personality, and it was
forgetting to handle the case that there were no existing fixed stack objects.
In that case, it used offset 0 for UnwindHelp, which is the offset of the
return address.

I fixed this with two changes in r253245:
- If there are no fixed stack objects, use offset -SlotSize, which is after the
return address
- Don't allocate UnwindHelp at all if there are no funclets</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>