-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Performance or correctness regression from one stable version to another.
Description
Code
For a reduced-ish testcase, create a lib with the following Cargo.toml:
[package]
name = "testcase"
version = "0.1.0"
[lib]
crate-type = ["staticlib"]
path = "lib.rs"
[dependencies]
wast = { version = "38.0.1" }
profile.release]
lto = true
and lib.rs
:
extern crate wast;
The following command fails:
$ RUSTFLAGS="-Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=4 -Cembed-bitcode=yes" cargo build --release
Compiling leb128 v0.2.5
Compiling wast v38.0.1
Compiling testcase v0.1.0 (/tmp/testcase)
warning: Linking COMDATs named '_ZN4core3ptr66drop_in_place$LT$alloc..vec..Vec$LT$wast..ast..func..Local$GT$$GT$17h37651afa29ff204cE': nodeduplicate has been violated!
error: failed to load bc of "wast-c09551a471674a65.wast.553280a2-cgu.1.rcgu.o":
This worked fine up to 1.55. This fails with 1.56. Values of -sanitizer-coverage-level
between 1 and 4 fail.
It also fails with nightly (but -Cpasses=sancov
needs to be replaced with -Cpasses=sancov-module
), and the error message is slightly different:
warning: Linking COMDATs named '_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$wast..ast..types..FunctionType$GT$$GT$17he370b2da7c4642faE': GlobalVariable required for data dependent selection!
error: failed to load bc of "wast-262865a11263ff3e.wast.a15963cd-cgu.1.rcgu.o":
Disabling LTO or using thin LTO makes it work.
sunjay
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Performance or correctness regression from one stable version to another.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
hellow554 commentedon Oct 27, 2021
The following bash script will create a MCVE:
Bash Script
Running
RUSTFLAGS="-Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=4 -Cembed-bitcode=yes" cargo build --release
will lead to the following error:@rustbot modify labels: -E-needs-mcve
hellow554 commentedon Oct 27, 2021
Regression in db002a0
cc #87570 @nikic
@rustbot modify labels: A-llvm
apiraino commentedon Feb 24, 2022
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.
@rustbot label -I-prioritize +P-medium
2 remaining items