-
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
Cargo 1.71.0-beta.1 produces a buggy build of the Helix text editor (since dfe3188
)
#112171
Comments
dfe3188
)
The bisected commit was the removal of NRVO - it is possible that this just masked some underlying issue. Edit: Nevermind, I only now saw the panic backtrace. This comment can then be ignored, it makes more sense to investigate based on that backtrace. |
This is not a Rust bug, this is UB in Helix or one of its dependencies. AddressSanitizer says stack-use-after-return which sounds exactly right, a stack-use-after-return would be covered up by NRVO.
Then type AddressSanitizer report
|
The right place to report this is Helix or one of its dependencies. I'm closing this issue to indicate it is not a Rust problem and remove it from the prioritiziation queue, but I'm leaving it in my personal work queue to figure out exactly where this should be reported. I like debugging this sort of thing. |
At glance it looks like one bug is in |
I wrote that code. Edit: Ah actually it's an &Arc inside the RopeSlice not and &T. Ropey was relying on this being optimized to &T for performance reasons and I was accidentally relying on it for soundness. Boxing in helix is the easy solution but this will also degrade performance in ropey so I will try to submit a patch to ropey to use the equivalent of https://docs.rs/triomphe/0.1.8/triomphe/struct.ArcBorrow.html |
helix-editor/helix#7227 fixes the crash, will look into improving ropey in the future |
I am just a newbie playing with the awesome language and text editor, so I sorry that I can't point out the exact code that causes this.
Helix text editors built with beta and nightly rust toolchains crash easily. In stable this does not happen.
Given the very strong assurances of stability of Rust, I felt it appropriate to report this bug to rustc rather than helix.
How to Reproduce
ii
. (Like Vim, it means switch to insert mode and inserti
.)Helix's Backtrace
Version with regression
searched nightlies: from nightly-2023-04-14 to nightly-2023-05-26
regressed nightly: nightly-2023-05-09
searched commit range: c4190f2...2f2c438
regressed commit: dfe3188
bisected with cargo-bisect-rustc v0.6.6
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
The text was updated successfully, but these errors were encountered: