LLVM ERROR: Misplaced debug info with -Cdebuginfo=1 -Zsanitizer=cfi -Clto #132615
Labels
A-LTO
Area: Link-time optimization (LTO)
C-bug
Category: This is a bug.
PG-exploit-mitigations
Project group: Exploit mitigations
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This is a repro of a bug that was observed in Chrome: https://issues.chromium.org/issues/40266913
Code
Assume the following cross-language CFI setup
Meta
rustc --version --verbose
:Error output
Executing:
RUSTFLAGS="--cfg feature=\"panic_immediate_abort\" -Zsplit-lto-unit -Clinker-plugin-lto=yes -Coverflow-checks=on -Cdefault-linker-libraries -Zdep-info-omit-d-target -Zmacro-backtrace -Ccodegen-units=1 -Cpanic=abort -Zpanic_abort_tests -Copt-level=3 -Zdwarf-version=4 -Cdebuginfo=1 -Clinker-plugin-lto=yes -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers" LDFLAGS="-Werror -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id=fast -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -flto=thin -Wl,--thinlto-jobs=all -Wl,-mllvm,-import-instr-limit=30 -Wl,-mllvm,-disable-auto-upgrade-debug-info -Wl,-mllvm,-inlinehint-threshold=360 -fwhole-program-vtables -Wl,--undefined-version -Wl,--no-call-graph-profile-sort -m64 -no-canonical-prefixes -Wl,--gc-sections -Wl,-z,defs -Wl,--as-needed -nostdlib++ -fsanitize=cfi-vcall -fsanitize=cfi-icall -fsanitize-cfi-icall-experimental-normalize-integers" cargo b -Z build-std=std,panic_abort --target x86_64-unknown-linux-gnu
(this mirrors Chrome's RUSTFLAGS and LDFLAGS).Backtrace
The text was updated successfully, but these errors were encountered: