[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 09:52:49 PST 2023
MaskRay added a comment.
In D138846#4657246 <https://reviews.llvm.org/D138846#4657246>, @hans wrote:
>> I just saw @glandium's earlier comment:
>>
>>> Code built with older versions of LLVM (e.g. rust) and running with the updated runtime crash at startup with this change.
>>
>> This is the exact same issue we encountered. Because there is a profile format change, it's expected to update both clang and rustc to use the same version of llvm in order for it to work.
>
> Thanks for figuring this out!
>
> Would it be possible to somehow make profile format mismatches a linker error instead of a hard-to-debug runtime problem? For example could the instrumentation depend on some symbol in the runtime whose name includes a version number?
>
> I think the ASan (and maybe other sanitizer) instrumentations do this.
Te detect incompatibilities, we can either rename the metadata section or add a version detector field either to the format header or in individual datum.
Renaming seems infeasible since a lot of places need to be modified (difficult to make an atomic update everywhere).
This patch does introduce a new version: `Version11` and llvm-profdata will seem to report errors for older versions.
Does the Rust side fail to report a version mismatch error?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138846/new/
https://reviews.llvm.org/D138846
More information about the cfe-commits
mailing list