-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
LiveVariables assertion prevents llvm-gcc build #1579
Comments
Command line options (to cc1) used to generate this: -quiet -v -I. -I. -I../../src-1/gcc -I../../src-1/gcc/. |
Bytecode generated by -emit-llvm switch to llc cc1 -quiet -v -I. -I. -I../../src-1/gcc -I../../src-1/gcc/. llvm-as /tmp/pr1207.bc Unfortunately, running llc on this doesn't replicate the problem. |
Confirmed here. |
Yup, stack trace for 'llc -relocation-model=pic pr1207.bc' is: #0 0x00b25402 in __kernel_vsyscall () |
Since this doesn't seem to be getting attended to, I'm going to revert Evan's |
Script to revert Evant's changes.
|
Evans changes have been reverted. These alleviates the issue, but I'm not Assigning to Evan. |
Reapplied with fix. llvm-gcc builds fine on Mac OS X. Reid / Anton, please trye to d a llvm-gcc build on |
libgcc is ok for me now. I'm starting building Qt. If everything will be ok, |
Seems, llc -debug is broken somehow. Try attached bytecode. It should:
It seems to do so, but adding -debug lead llc to segfault. |
Anton, I think llc -debug is a separate issue. Can you close this bug and open a new one for that? Thanks! |
Qt is heavily broken. I'm investigating. |
Evan, this change definitly breaks Qt. Are there any fails in nightlytests? I'm I'm also attaching patch which will undo recent LiveVars change. |
LiveVars patch. |
There are some significant regressions which I am trying to track down. They appear to be unrelated to |
Well. Ok. I'm waiting. |
I've fix the bug which breaks a bunch of tests that use double. Anton, can you test QT again? |
Surely. |
It's building now. However, I don't understand how this issue can cause |
Qt is still broken. It just segfaults.... |
Reduced miscompilation just to one .o. Comparing. |
Evan, recent LiveVariables patches caused the folowing regression to Qt. Please There are only few differences, but they seems to be very strange. |
I'm sorry. "Good" output should be "Bad" and vice versa. |
"Bad" output |
"Good" output |
Ah, ok. I'd suspected that. I'll try to fix this today. |
Anton, can you confirm _ZNK11QMetaObject6methodEi is the offending function? For Linux / PIC, EBX |
No. Not always. Any register can be used as GOT pointer with only one I'll check function separately and let you know. |
Well. Yes. It seems, that %ebx is changed before calls via PLT. This applies for all 3 functions found in diff between "bad" and "good" |
Needed to add an implicit use of EBX so the result of the instruction that calculate GOT is not dead right Anton, can you verify if this fixes QT? |
Verifying... |
Evan, patch fixes issue with that file. Thanks. I'll close this bug just after |
Fixed, thanks, Evan. |
Extended Description
After updating LLVM and applying recent patches to llvm-gcc
(CUMMULATIVE-276.patch sent to llvm-commits today), the llvm-gcc build now fails
while compiling libgcc, with:
cc1: LiveInterval.cpp:227: void llvm::LiveInterval::removeRange(unsigned int,
unsigned int): Assertion `I->contains(Start) && I->contains(End-1) && "Range is
not entirely in interval!"' failed.
Stack trace:
#0 0x00826402 in __kernel_vsyscall ()
#1 0x00321ee9 in raise () from /lib/libc.so.6
#2 0x003234f1 in abort () from /lib/libc.so.6
#3 0x0031b859 in __assert_fail () from /lib/libc.so.6
#4 0x08735631 in llvm::LiveInterval::removeRange (this=0xaa2f1f0, Start=14,
End=115) at LiveInterval.cpp:226
#5 0x0873cd73 in llvm::LiveInterval::removeRange (this=0xaa2f1f0, LR={start =
14, end = 115, ValId = 0})
at /proj/llvm/llvm-1/include/llvm/CodeGen/LiveInterval.h:253
#6 0x0873bbce in llvm::LiveIntervals::runOnMachineFunction (this=0xaa410e0, fn=
#7 0x0856a4aa in llvm::MachineFunctionPass::runOnFunction (this=0xaa410e0, F=
#8 0x088c13c8 in llvm::FPPassManager::runOnFunction (this=0xaa3fda8,
F=@0xaa55978) at PassManager.cpp:998
#9 0x088c162a in llvm::FunctionPassManagerImpl::run (this=0xaa3fac8,
F=@0xaa55978) at PassManager.cpp:953
#10 0x088c16ec in llvm::FunctionPassManager::run (this=0xaa3e0f8, F=@0xaa55978)
at PassManager.cpp:895
#11 0x0833b8d8 in llvm_asm_file_end () at ../../src-1/gcc/llvm-backend.cpp:473
#12 0x0830bdc9 in toplev_main (argc=0, argv=0xbfed1fc4) at
../../src-1/gcc/toplev.c:1167
#13 0x0030f4e4 in __libc_start_main () from /lib/libc.so.6
#14 0x0804e171 in _start ()
The text was updated successfully, but these errors were encountered: