-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Building with debugging causes test failures on i686-unknown-linux-gnu #1343
Comments
What sort of output do you see? |
Here's what I'm seeing now
|
This doesn't sound like what I was seeing in the original report. |
Running the alt-bot-fail test results in a failure here
|
This could just be something wrong with check_stack_alignment, which I wrote recently and do not have complete confidence in. |
This is with --disable-optimize-cxx - otherwise check_stack_alignment gets inlined |
Er, check_stack_alignment is an assembly function. It shouldn't be inlined. |
Disabling check_stack_alignment and turning off valgrind results in segfaults with the following backtrace:
gdb doesn't think the program counter is inside a function in either of these frames |
Having configured with --disable-optimize on OS X 10.6.8, I don't see any problems with alt-bot-fail (or any other run-fail tests, for that matter). |
You're building 32-bit tests? |
I guess it could be linux-specific |
I'm building x86_64. |
0e98e64 made the valgrind complaints about debug info go away, and now I see again the errors that this issue was originally about. These problems are only present for 32-bit targets. Here's a sampling:
|
I'm going to disable debug info on 32-bit targets. |
Consensus is to, short term, add a table in the driver that lists which targets debuginfo is actually working for, and to disable it for i686 for now. Friendlier than random corruption. |
Compiling run-pass/return-nil for i686-linux, the call to f() is followed by a bogus 'subl $4, %esp' Without -g:
With -g:
|
LLVM does that if it thinks the function being called has an |
It is definitely related to the sret attribute. Right now -g does not apply sret to the function definition, but does apply sret to the call site. Remove sret makes the problem go away. I will probably just remove sret for now, let @jdm ponder it later. It does seem to me that sret isn't a debugging attribute - when we figure out how it should be used, we should just always use it. |
Ah, sorry about leaving that in. The sret attribute was part of my attempt to get function return values to show up correctly in gdb due to our bizarro way of returning values. |
This command:
Results in tests where the instruction pointer ends up in bizarre places or the stack is misaligned. I don't know if it's related to the recent addition of debug info or not.
The text was updated successfully, but these errors were encountered: