]> git.lizzy.rs Git - rust.git/commit
Add workaround for archive reading bug in LLDB.
authorMichael Woerister <michaelwoerister@posteo>
Thu, 5 Jun 2014 08:24:34 +0000 (10:24 +0200)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 7 Jun 2014 02:51:19 +0000 (19:51 -0700)
commit6a43af3f84ef97d4d0e5b55c5336a4256bd1ebb7
treebe314008238e8278f7e378c5c22999845752009a
parent735e518a815bd06fa99ea343351041ba22751fe4
Add workaround for archive reading bug in LLDB.

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 #14356.
src/librustc/back/archive.rs
src/librustc/back/link.rs
src/librustc/back/lto.rs