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
Assertion failed: (RegNo < NumRegs && "Attempting to access record for invalid register number!") #33735
Comments
Weird, the reproducer doesn't seem to work when I run it on my Linux machine. |
Fun times: on my Mac it reproduces roughly 20% of the time. Something is seriously wrong here. |
The full crash message: Assertion failed: (RegNo < NumRegs && "Attempting to access record for invalid register number!"), function operator[], file ../include/llvm/MC/MCRegisterInfo.h, line 340.
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: |
Managed to reproduce it with a position-independent build (to enable ASLR) on Linux and by running the test multiple times: Configured with: $ CFLAGS=-fPIE CXXFLAGS=-fPIE LDFLAGS=-pie cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm Then run with: for i in |
preprocessed source for i in
|
Reverting r312154 fixes it. I assume this is some iteration order problem. |
Reverted in r312178. |
I'm having trouble reproducing this as well. Can you tell me what version of clang/gcc and what compiler flags were used to build the clang your are testing? |
The version I used was clang version 6.0.0 (trunk 312149) (llvm/trunk 312161) I configured my build like this: $ CFLAGS=-fPIE CXXFLAGS=-fPIE LDFLAGS=-pie cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm And built with gcc 4.9.0. I think what matters is to make sure it's built as a position-independent executable and run with aslr enabled, as the problem seems to be due to iteration order of something where the order depends on pointer values. |
Thanks, that did the trick. |
Extended Description
This assert fires when building Chromium for Mac with clang version 6.0.0 (trunk 312149) (llvm/trunk 312161)
Repro coming up.
The text was updated successfully, but these errors were encountered: