-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix off-by-one error causing slice::sort to abort the program #136163
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
Conversation
r? @chenyukang rustbot has assigned @chenyukang. Use |
r? libs |
Looks good to me, @Voultapher any thoughts? |
I'm suggesting minor changes, the fix itself looks good. |
8ffa11c
to
37abe21
Compare
Some of the comments mention |
37abe21
to
ea42603
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the fix @uellenberg
In the original driftsort repository this constant was defined as |
Fixes rust-lang#136103. Based on the analysis by @jonathan-gruber-jg and @orlp.
ea42603
to
1565254
Compare
Could we maybe change the PR title, crash usually suggests UB, here we are just running into assert style function preconditions, in this case not using panics and instead abort to save on binary-size. |
@bors r+ |
Fixes #136103.
Based on the analysis by @jonathan-gruber-jg and @orlp.