Skip to content

Segfault on latest nightly with codegen-units > 1 #47364

Closed
@jonhoo

Description

@jonhoo

On the latest nightly, the default is now to run release builds with codegen-units > 1 (see #46910). For some reason, this causes https://github.com/mit-pdos/distributary to segfault at runtime. Setting

[profile.release]
codegen-units = 1

makes the segfault go away. To reproduce:

$ rustc +nightly --version
rustc 1.25.0-nightly (f62f77403 2018-01-10)
$ git clone https://github.com/mit-pdos/distributary.git
$ cd distributary
$ git checkout open-loop
$ cargo +nightly b --release --manifest-path benchmarks/Cargo.toml --bin vote
$ target/release/vote -r 5 --target 100000 localsoup
Segmentation fault (core dumped)
$ # add codegen-units = 1 to Cargo.toml under [profile.release]
$ cargo +nightly b --release --manifest-path benchmarks/Cargo.toml --bin vote
$ target/release/vote -r 5 --target 100000 localsoup
# wait ~5s and notice that it completes without crashing

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions