Skip to content

"fixup value out of range" error (LLVM bug?) #146

@jeehoonkang

Description

@jeehoonkang

코드를 좀만 건드려도 다음과 같은 에러가 납니다

$ make qemu 
cargo xbuild --manifest-path kernel-rs/Cargo.toml --target kernel-rs/riscv64gc-unknown-none-elfhf.json --release
   Compiling core v0.0.0 (/kaist-cp-home/jeehoon.kang/.rustup/toolchains/nightly-2020-06-12-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore)
   Compiling compiler_builtins v0.1.32
   Compiling rustc-std-workspace-core v1.99.0 (/kaist-cp-home/jeehoon.kang/.rustup/toolchains/nightly-2020-06-12-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/tmp/cargo-xbuild.McU5pMRsTKs6)
    Finished release [optimized + debuginfo] target(s) in 9.65s
   Compiling autocfg v1.0.0
   Compiling bitflags v1.2.1
   Compiling scopeguard v1.1.0
   Compiling num-traits v0.2.12
   Compiling num-integer v0.1.43
   Compiling num-iter v0.1.41
   Compiling rv6-kernel v0.1.0 (/kaist-cp-home/jeehoon.kang/Works/rv6/kernel-rs)
error: fixup value out of range

error: aborting due to previous error

error: could not compile `rv6-kernel`.

To learn more, run the command again with --verbose.
make: *** [Makefile:98: kernel-rs/target/riscv64gc-unknown-none-elfhf/release/librv6_kernel.a] Error 101

검색해보니 LLVM 버그를 밟은 것 같네요 Aㅏ... rust-lang/rust#74813
rust-lang/rust에서 해결해줄때까지 기다리겠습니다.

일단 rust code를 debug로 컴파일하고, 대신 debug profile에 opt-level=1을 주는걸로 바꾸겠습니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions