-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE when instrument-coverage
flag is set: 'assertion failed: self.start_pos.to_u32() + total_extra_bytes <= bpos.to_u32()'
#84159
Comments
instrument-coverage
flag is set instrument-coverage
flag is set: 'assertion failed: self.start_pos.to_u32() + total_extra_bytes <= bpos.to_u32()', compiler/rustc_span/src/lib.rs:1511:9
instrument-coverage
flag is set: 'assertion failed: self.start_pos.to_u32() + total_extra_bytes <= bpos.to_u32()', compiler/rustc_span/src/lib.rs:1511:9instrument-coverage
flag is set: 'assertion failed: self.start_pos.to_u32() + total_extra_bytes <= bpos.to_u32()'
@dvente - I recently submitted a couple of changes related to this kind of ICE error, and the most recent change is now available in nightly: Can you please check to see if the error addresses your issue? If not, can you provide a small example rust program that I can easily copy and build, that reproduces the issue? Thanks! |
I've tried it and the issue persists on the newest nightly commit on my machine. Sadly I can't provide you with any rust code to reproduce it since I'm not actually trying to compile any code myself when this triggers. However, you should be able to reproduce the issue by running: |
Well, as it turns out there is one more related ICE bug I just notice in the github issues. I've submitted a fix for review. |
Thanks for trying it again. I'm hopeful this will be the last bug and fix related to incompatible spans. |
@dvente - Just letting you know that last PR was merged a few days ago and should be in Rust nightly now. (You may need to add Let me know if this doesn't fix your problem. Thanks! |
I've tried it and the problem seems to be fixed! I'm managing to run kcov now without any problems, thank you very much! |
Context
The issue that prompted me to make this bug report occurred when I was trying to install something. As such I've provided a Dockerfile that reproduces the panic, instead of rust code, I hope that is also okay. I had been experimenting with
cargo-kcov
to measure test coverage for my new project, which I noticed thatcargo add chrono
didn't work. So I executedcargo install cargo-edit --force
which produced the error. After some extra experimentation, I found out that it only happens ifRUSTFLAGS="-Zinstrument-coverage"
is set. Feel free to contact me if I've missed any relevant info.Code [Dockerfile]
Meta
[This is the meta from my own installation that caused the error originally, not from the docker, in case the docker image get's updated. again, hope this is okay]
Error output
Backtrace
The text was updated successfully, but these errors were encountered: