Skip to content

Rust compiler crashes during compilation #66595

Closed
@ethindp

Description

@ethindp

So, I have no idea exactly what I did. I'm writing an operating system and am working on implementing SATA disk IO in my kernel. My code is at https://github.com/ethindp/kernel.
In order to actively read from the disk and get all updates, I use read_volatile() all over the place in my disk IO functions. I have no idea what I did, but now my kernel doesn't build. When I run cargo xbuild, the following happens:

  1. Cargo builds all dependencies and begins building the kernel.
  2. Rustc sits there for over an hour, not producing any output, then crashes with (on windows) error code 0xc000000005 (access violation).

I am running the latest nightly version of rust, rustc 1.41.0-nightly (3e525e3 2019-11-18). The troublesome code is at https://github.com/ethindp/kernel/blob/master/src/drivers/storage/ahci.rs. (Note: the code is very messy right now.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-compiletimeIssue: Problems and improvements with respect to compile times.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions