Skip to content

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

Closed
luqmana wants to merge 1 commit into
rust-lang:masterfrom
luqmana:rhelp
Closed

librust: Stop rust tool from crashing on macos.#8086
luqmana wants to merge 1 commit into
rust-lang:masterfrom
luqmana:rhelp

Conversation

@luqmana

Copy link
Copy Markdown
Contributor

#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
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
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.
@borsbors 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
closesrust-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
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
8086: Use a highlight modifier for intra doc links r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Sign up for freeto 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

@luqmana@alexcrichton@Aatch@bors