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

Avoid 16-byte filenames in rlibs #14683

Closed
wants to merge 2 commits into from

Conversation

alexcrichton
Copy link
Member

Continuation of #14672 with an extra case handled (objects from native libraries).

cc #14356

LLDB contains a bug that makes it crash if an archive it reads
contains a file the name of which is exactly 16 bytes long. This
bug recently has made it impossible to debug Rust applications with
LLDB because some standard libraries triggered it indirectly:
For rlibs, rustc includes the LLVM bytecode in the archive, giving
it the extension ".bc.deflate". For liballoc (for example) this
results in the 16 character filename "alloc.bc.deflate", which is
bad.

This commit replaces the ".bc.deflate" suffix with
".bytecode.deflate" which itself is already longer than 16 bytes,
thus making sure that the bug won't be run into anymore.

The bug could still be run into with 14 character filenames because
then the .o files will trigger it. However, this is much more rare
and working around it would introduce more complexity than necessary
at the moment. It can always be done later on, if the need arises.

Fixes rust-lang#14356.
In addition to avoiding 16-byte filenames with bytecode files, this commit also
avoids 16-byte filenames with object files pulled in from native libraries.
@sfackler
Copy link
Member

sfackler commented Jun 6, 2014

Is this something we'll want to revert when the LLDB bug is fixed? We should probably have an issue + FIXMEs if it is.

@alexcrichton
Copy link
Member Author

From what @michaelwoerister has said, this plagues all versions of LLDB ever. This will likely be here for a very long time, sadly :(

@bors bors closed this in e87e180 Jun 7, 2014
@alexcrichton alexcrichton deleted the issue-14356 branch June 7, 2014 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants