Closed kornelski closed 5 years ago
Same issue here:
$rustc --version rustc 1.34.0 (91856ed52 2019-04-10)
$cargo call-stack --version cargo-call-stack 0.1.3
Error: BUG: failed to parse .ll file; please submit a bug report. Details:
Error(Code(CompleteStr("define internal fastcc void @_ZN7funcmod7funcmod17h4d3d2f225276ade8E(%\"core::result::Result<(),
........... +23MB of code
One more similar 20MB report: https://vi-server.org/pub/ccs_bugreport.xz
are there any updates or workarounds with respect to this issue?
just in case this is useful, I have this problem even with cortex-m-examples
such as fn.rs
cargo +nightly call-stack --example fn > cg.dot
Output:
error: BUG: failed to parse .ll file; please submit a bug report. Details:
Error(Code(CompleteStr("define void @main() unnamed_addr #1 !dbg !1220
....
rustc 1.40.0-nightly (1423bec54 2019-11-05)
binary: rustc
commit-hash: 1423bec54cf2db283b614e527cfd602b481485d1
commit-date: 2019-11-05
host: x86_64-unknown-linux-gnu
release: 1.40.0-nightly
LLVM version: 9.0
Somehow newer versions seem to be broken. I tried going back to a nightly that depends on LLVM 8.0 (nightly-2018-12-27) and it works!
Reinstall from scratch - Not really necessary
rustup self uninstall
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
install cargo-call-stack
cargo +stable install cargo-call-stack
Use nightly-2018-12-27
rustup toolchain install nightly-2018-12-27
rustup target add thumbv7m-none-eabi --toolchain nightly-2018-12-27
This rustc +nightly-2018-12-27 -V -v
outputs:
rustc 1.33.0-nightly (a7be40c65 2018-12-26)
binary: rustc
commit-hash: a7be40c65ae8ace467c9c40b0a22642973e31a13
commit-date: 2018-12-26
host: x86_64-unknown-linux-gnu
release: 1.33.0-nightly
LLVM version: 8.0
Now it works well
cargo +nightly-2018-12-27 call-stack --example fn
Try v0.1.4; it supports the new identifiers that rustc is producing in the llvm ir.
If you run into problems with that version open a new issue including the Rust source code that reproduces the problem. If you want to include the llvm-ir in the bug report include only the first llvm item (e.g. define void .. { .. }
that appears in the output.
When I run
I get:
followed by 177 megabytes of code. Pasting that much into a bug report probably wouldn't be helpful. Besides, this project contains some proprietary code, so I'm not allowed to disclose all of it.
Perhaps you could change this error case to quote the unparsable input more precisely?