-
Notifications
You must be signed in to change notification settings - Fork 13.4k
debuginfo/evec-in-struct.rs fails on master #17808
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
Comments
This seems to have started occuring after upgrading llvm |
Interesting. I'll look into it. |
I can't reproduce that. Are you doing anything special in your build? Any special configure-flags for example? Also, can you post the whole output from the test? |
I removed my rust installation and built from a clean build directory with no configure options and still reproduced it. Full output:
|
Reduced test case: fn main() {
let _foo = [[1u],[1]];
} gdb output:
|
Thanks a lot for the detailed information. I'll try to reproduce it again today. I wasn't able to do so so far, although you seem to have a very standard setup (Linux x86_64, recent GDB, no custom LLVM, ...) |
So, I installed Fedora 20 in a VM and wouldn't you believe it, I can reproduce the bug exactly as you describe it. This is going to be interesting |
LLVM has changed the way it encodes fixed-size arrays a few weeks back (llvm-mirror/llvm@06c1373) and for some reason GDB can't handle that on Fedora. I'm not sure yet how to deal with this problem since it doesn't seem to occur anywhere else and LLVM's new encoding is just as legal as the old one... |
GDB seems to think the inner
So it's simply reading from the wrong offset when displaying the second element of the outer array. LLDB works fine. |
I just tested with stock gdb 7.7.1 built from source, and it worked! This suggests the issue is with a patch applied by Fedora. I'll grab the srpm and try to track it down. |
I imported the entire patch stack into git and bisected down to |
Maybe Tom @tromey can help us out here?
Do you have any suggestions on how to deal with this? Should we just report this in GDB's normal bug tracker? Any pointers from you would be much appreciated. |
I am not sure offhand what the problem is, but if it happens with the Fedora gdb and not with the FSF gdb, then the correct place to report it is Red Hat's bugzilla. I can handle this if you like, just let me know. |
... though come to think of it, it would be nice to have a dump of the relevant DWARF handy for the bug report. Could you get that? I didn't see it in this bug. |
Thanks Tom, I'll post the relevant DWARF here asap. |
As a reference, for the following program...
... GCC produces the following DWARF:
The interesting part here is the |
So, here's the Rust version of the program:
The DWARF for it looks like this:
As you can see, the
As far as I remember, omitting Let me know if you need anything else! |
I opened a bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1160826 |
Thanks a lot! |
Jan says that it is most likely the VLA patches. Fedora 21 will drop these and use the ones that went in upstream instead. So if you could, it would be worth trying the a newer gdb. You can find some RPMs here: http://rpmfind.net/linux/rpm2html/search.php?query=gdb; you'd want one marked "fc21". |
I can confirm that everything works as expected with the fc21 version of GDB. |
minor: log error when sysroot can't be discovered Closes rust-lang#17808
Relevant output:
...
GDB version:
I'm not sure why this fails on my system and not on the build bots.
The text was updated successfully, but these errors were encountered: