Skip to content

compilation with sancov and multiple codegen units results in SIGSEGV: invalid memory reference; nightly-2017-12-26 regression #47071

Closed
@frewsxcv

Description

@frewsxcv
git clone https://github.com/rust-fuzz/targets.git
cd targets
export RUSTFLAGS="-C codegen-units=16 -C passes=sancov -C llvm-args=-sanitizer-coverage-level=3 -Z sanitizer=address -C opt-level=3"
cargo build --verbose
error: Could not compile `getopts`.

Caused by:
  process didn't exit successfully: `rustc --crate-name getopts /Users/corey/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.15/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=e4fe6dbb6aba3ffd -C extra-filename=-e4fe6dbb6aba3ffd --out-dir /private/tmp/targets/target/debug/deps -L dependency=/private/tmp/targets/target/debug/deps --cap-lints allow -C passes=sancov -C llvm-args=-sanitizer-coverage-level=3 -Z sanitizer=address -C opt-level=3` (signal: 11, SIGSEGV: invalid memory reference)

EDIT: updated RUSTFLAGS to include -C codegen-units=16 since rust-fuzz/targets master was updated to use -C codegen-units=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-sanitizersArea: Sanitizers for correctness and code qualityC-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions