Comments (2)
Could this be related to libstd getting dynamically linked without being built with -Cinstrument-coverage
itself? Maybe try if RUSTFLAGS="-Cprefer-dynamic"
works for a regular crate without any dylibs other than libstd involved.
from rust.
Maybe try if
RUSTFLAGS="-Cprefer-dynamic"
works for a regular crate without any dylibs other than libstd involved.
I tried with setting the dependency crate-type back to default and with -Cprefer-dynamic enabled, but no error occurred.
-[lib]
-crate-type = ["dylib"]
+#[lib]
+#crate-type = ["dylib"]
$ $env:RUSTFLAGS="-C instrument-coverage -Cprefer-dynamic"; cargo test --tests -v
Compiling dylib v0.1.0 (C:\Users\taiki\projects\tmp\coverage_debugging\dylib)
Running `rustc --crate-name dylib --edition=2021 dylib\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=183 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=66b504ff4471d6a2 -C extra-filename=-66b504ff4471d6a2 --out-dir C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\deps -C incremental=C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\incremental -L dependency=C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\deps -C instrument-coverage -Cprefer-dynamic`
Compiling repro v0.1.0 (C:\Users\taiki\projects\tmp\coverage_debugging)
Running `rustc --crate-name repro --edition=2021 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=183 --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test -C metadata=c71f36c1d55bce77 -C extra-filename=-c71f36c1d55bce77 --out-dir C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\deps -C incremental=C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\incremental -L dependency=C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\deps --extern dylib=C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\deps\libdylib-66b504ff4471d6a2.rlib -C instrument-coverage -Cprefer-dynamic`
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.42s
Running `C:\Users\taiki\projects\tmp\coverage_debugging\target\debug\deps\repro-c71f36c1d55bce77.exe`
running 1 test
test test::test_double ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
from rust.
Related Issues (20)
- Incorrectly suggests replacing end characters of function call with double quotes HOT 1
- The implementation `From<&[T; N]>` for `Option<&[T]>` seems missing HOT 2
- When a trait is missing items, there are many follow-up errors distracting from the root cause HOT 1
- When passing too many lifetimes to a struct, there are tons of unrelated errors about needing explicit lifetime annotations HOT 2
- Tracking Issue for `optimize_for_size` standard library feature
- LazyCell, LazyLock are missing some big-picture documentation
- Audit usage of `command_output` methods in rmake.rs tests
- core::slice::sort::partial_insertion_sort: Redundant call to insertion_sort_shift_right HOT 2
- Excess object in `staticlib` archive eventually causing link error HOT 1
- Tracking Issue for `lazy_cell_consume` HOT 1
- Missed enum layout optimization depending on enum variant field reordering HOT 2
- binary operators hide "trait bounds not satisfied" errors
- Memcpy generated for Vec::push(Default::default()) instead of initialization in-place
- ICE: `expected region for ..` HOT 2
- Crash rustc HOT 1
- Confusing compiler suggestion with type/variable with underscore prefix
- Potential memory leak (unexpected 15gb ram usage) HOT 2
- pre-push hook should only look at staged changes
- `No bound vars found for HirId(DefId(` in compiler/rustc_middle/src/ty/context.rs
- assertion `left == right` failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.