Skip to content

librust: Stop rust tool from crashing on macos. #8086

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

Closed
wants to merge 1 commit into from

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented Jul 28, 2013

#7617

While the code that was there should've been perfectly fine (and seemingly is on linux at least) there seems to be some sort of weird interaction going on with statics and vectors. I couldn't get a smaller test case to reproduce that behaviour. The for loop in rust::usage seemingly just goes past the end of the vector thus getting garbage which it tries to pass to malloc somewhere down the line.

In any case, using a fixed length vector seems to mitigate this.

@alexcrichton
Copy link
Member

This definitely doesn't close 7617, so could you put a FIXME above that line attributing it to the issue? Also if you found anything which is useful to write in as well, I'm sure a future-someone would thank you immensely!

@Aatch
Copy link
Contributor

Aatch commented Jul 28, 2013

@alexcrichton if this doesn't close #7617, could you edit the title of that issue to make it more clear. Since to me, this does close that issue.

@alexcrichton
Copy link
Member

Indeed I can!

bors added a commit that referenced this pull request Jul 28, 2013
#7617 

While the code that was there should've been perfectly fine (and seemingly is on linux at least) there seems to be some sort of weird interaction going on with statics and vectors. I couldn't get a smaller test case to reproduce that behaviour. The for loop in `rust::usage` seemingly just goes past the end of the vector thus getting garbage which it tries to pass to malloc somewhere down the line.

In any case, using a fixed length vector seems to mitigate this.
@bors bors closed this Jul 28, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 17, 2021
Fix bad suggestion on `option_if_let_else` when there is complex subpat

closes rust-lang#7991

Prefer not warning any complex subpat in `option_if_let_else` rather than suggesting obscure suggestions.

changelog: [`option_if_let_else`] does not warn when complex subpat is present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants