Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM64] Debugging Arm64 debug binary gives memory access error when accessing local variables #40394

Closed
llvmbot opened this issue Mar 12, 2019 · 3 comments
Labels
bugzilla Issues migrated from bugzilla c++

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 12, 2019

Bugzilla Link 41049
Resolution FIXED
Resolved on Oct 16, 2019 18:23
Version unspecified
OS Windows NT
Reporter LLVM Bugzilla Contributor
CC @dblohm7,@DougGregor,@jmorse,@zygoloid

Extended Description

Here are my repro steps. I believe this holds for any amd64 debug program.

  1. Create test.cpp whose contents are simply:

int main() {
int x = 1;
}

  1. Build the exe with clang-cl.exe --target=arm64-windows /Zi /Od test.cpp

  2. Deploy test.exe / test.pdb to arm64 machine

  3. Open exe under debugger, and break into code (windbg.exe test.exe, then bp test!main in command line)

  4. step into function and try to observe value of local variable.
    expected: local variable value displays
    actual: memory access error reported

No repro on amd64.
With arm64 retail (/O2 instead of /Od), no issue except for volatile variables, which also have memory access error.

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 6, 2019

We're seeing this in Firefox Nightly builds as well. Unlike comment 0, we use /O2 but still have problems with locals.

Here's a real-world build if it helps, although starting with the simpler reproducer from the original report may be a better idea:

  1. Unpack https://archive.mozilla.org/pub/firefox/nightly/2019/05/2019-05-06-13-03-08-mozilla-central/firefox-68.0a1.en-US.win64-aarch64.zip
  2. windbg.exe firefox\firefox.exe
  3. .sympath+ https://symbols.mozilla.org
  4. bp firefox!wmain; g
  5. Single-step a few times while watching the Locals window

Results:

Locals not available, and this message often appears in the debug output:
CvRegToMachine(arm64) conversion failure for 0x1

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jun 3, 2019

This should be resolved by rL362280 (https://reviews.llvm.org/rL362280)

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jun 3, 2019

That's great, thanks for the pointer! I'll try to confirm this the next time I build for arm (which isn't too often anymore).

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++
Projects
None yet
Development

No branches or pull requests

1 participant