<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:brucedawson@chromium.org" title="Bruce Dawson <brucedawson@chromium.org>"> <span class="fn">Bruce Dawson</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [codeview] Incorrect variable locations with stack realignment and call-frame optimization"
   href="https://bugs.llvm.org/show_bug.cgi?id=38857">bug 38857</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>FIXED
           </td>
           <td>---
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [codeview] Incorrect variable locations with stack realignment and call-frame optimization"
   href="https://bugs.llvm.org/show_bug.cgi?id=38857#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [codeview] Incorrect variable locations with stack realignment and call-frame optimization"
   href="https://bugs.llvm.org/show_bug.cgi?id=38857">bug 38857</a>
              from <span class="vcard"><a class="email" href="mailto:brucedawson@chromium.org" title="Bruce Dawson <brucedawson@chromium.org>"> <span class="fn">Bruce Dawson</span></a>
</span></b>
        <pre>So, it turns out this isn't quite fixed. I created a test branch for this bug
and for 38847. It creates and aliases a local variable called
"remaining_bytes_again" with a very distinctive value, and then intentionally
crashes in memcpy. The stack walk now works perfectly (so 38847 is fixed,
thanks!), but the displaying of locals is still wrong.

The artificial local variable is initialized like this:

uint64_t remaining_bytes_again = (remaining_bytes_ & 0x100000) + 0x12345678AB;

But windbg displays its value like this:

0:015> dt remaining_bytes_again
Local var @ 0xc16f544 Type unsigned int64
0x002e4151`00000012

The 0x12 is supposed to be in the high DWORD but instead it is in the low
DWORD. Looking at the stack I can see the full 8-byte value, but offset by four
bytes.

I've uploaded my test branch to crrev.com/c/1303399. My gn args are:

is_component_build = false
is_debug = false
target_cpu = "x86"
enable_nacl = false
use_goma = true
symbol_level = 2
remove_webcore_debug_symbols = true

All I do is launch chrome.exe under the debugger and wait. I usually log in to
gmail but I am not sure that is needed.</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>