[LLVMdev] bit code file incompatibility due to debug info changes

Eric Christopher echristo at gmail.com
Mon Nov 18 10:31:32 PST 2013


Hi Bob,

On Mon, Nov 18, 2013 at 9:56 AM, Bob Wilson <bob.wilson at apple.com> wrote:
> I just filed this as pr17982, but I'd like to call attention to it, since it seems like something we should try to fix in the 3.4 release.
>
> Here's the description from the PR:
>
> Sometime over the last year, and I'm fairly certain it has been since we released 3.3, the debug info metadata format has changed in incompatible ways.  If you try to use an older bit code file with the current compiler, it is not uncommon for the compiler to crash.  This goes against our goals for keeping backward compatibility for bit code files and is especially problematic for LTO since you can't reliably mix objects from different versions of clang.
>
> At a minimum, it seems like we need a version number in the debug info metadata so we can detect this situation and avoid crashing.
>

This is not going to be fixed.

Metadata formats are not guaranteed to be stable and this has been an
explicit design factor. The versioning support was removed many months
ago and the debug info format has been moving quickly. This has been
stated many times on list, in discussion, and with patches.

http://llvm.org/viewvc/llvm-project?rev=176838&view=rev

is the revision where the versioning, that didn't work anyhow, was
finally removed back in March.

Once the verifier works better it can discard debug metadata that
fails verification if we'd like to go that route.

-eric




More information about the llvm-dev mailing list