-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Static slices create corrupted iterators #7617
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
Comments
😕 WAT |
I think this has to do with the static |
Any idea of what might be causing this? I'm having the same problem. :( |
I can confirm the exact same error. Same platform and version. |
Happens also when built from source on Release+Asserts build. What's interesting - didn't happen on Debug+Asserts build ( |
I edited the title and the description to reflect the current state of affairs. |
#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.
fe9929e seems to have fixed this, installing Rust via Homebrew using |
👍 doesn't crash for me either |
It's a workaround, the issue is still unfixed. |
…iraffate Reference new diagnostic item docs in our docs :) The title says it all. The rustc dev guide now has some information about diagnostic items that are worthwhile linking to 🙃 --- changelog: none
Original bug report.
Version: 0.7
Platform: OSX (installed via Homebrew)
Running
rust help
displays an error.Updated information (by @alexcrichton, 7-28-2013)
The problem for this was patched over in #8086, the behavior seen was that the static slice of
Command
structs would cause problems with iteration. It was determined that usingiter()
caused problems while not using the method and iterating directly worked just fine.The text was updated successfully, but these errors were encountered: