-
Notifications
You must be signed in to change notification settings - Fork 13k
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
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.
Comments
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Nov 4, 2024
rcvalle
changed the title
LLVM ERROR: Misplaced debug info with -Cdebuginfo=2 -Zsanitizer=cfi -Clto
CFI: LLVM ERROR: Misplaced debug info with -Cdebuginfo=2 -Zsanitizer=cfi -Clto
Nov 4, 2024
@rustbot claim |
1c3t3a
changed the title
CFI: LLVM ERROR: Misplaced debug info with -Cdebuginfo=2 -Zsanitizer=cfi -Clto
LLVM ERROR: Misplaced debug info with -Cdebuginfo=1 -Zsanitizer=cfi -Clto
Nov 4, 2024
saethlin
added
A-LTO
Area: Link-time optimization (LTO)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Nov 5, 2024
This was referenced Nov 5, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 12, 2024
CFI: Append debug location to CFI blocks Currently we're not appending debug locations to the inserted CFI blocks. This shows up in rust-lang#132615 and rust-lang#100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks. Credits also belong to `@jakos-sec` who worked with me on this.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Nov 13, 2024
Rollup merge of rust-lang#132702 - 1c3t3a:issue-132615, r=rcvalle CFI: Append debug location to CFI blocks Currently we're not appending debug locations to the inserted CFI blocks. This shows up in rust-lang#132615 and rust-lang#100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks. Credits also belong to `@jakos-sec` who worked with me on this.
This can be closed as it was fixed in #132702. |
antoyo
pushed a commit
to antoyo/rust
that referenced
this issue
Jan 13, 2025
CFI: Append debug location to CFI blocks Currently we're not appending debug locations to the inserted CFI blocks. This shows up in rust-lang#132615 and rust-lang#100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks. Credits also belong to `@jakos-sec` who worked with me on this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: