-
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
Array indexes can overflow in some situations #2470
Labels
A-codegen
Area: Code generation
Milestone
Comments
ghost
assigned msullivan
May 31, 2012
What's the failure mode here? Does it just crash with an array out of bounds error? If so, that doesn't seem unreasonable to me. |
No, the failure mode is that it will successfully index into the array at a wrapped around index, which is almost certainly not what we want. |
ghost
assigned mozmark
Jun 6, 2012
graydon
added a commit
that referenced
this issue
Jun 6, 2012
graydon
added a commit
that referenced
this issue
Jun 7, 2012
Seems to me like an instance of a much more general problem, so I opened #6012 and am closing this. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 22, 2022
support current_exe and home_dir on macOS also fix write_os_str length logic
celinval
added a commit
to celinval/rust-dev
that referenced
this issue
Jun 4, 2024
Remove `--test` and add trailing test arguments to allow us to pass extra arguments to the test binary. Co-authored-by: Jaisurya Nanduri <91620234+jaisnan@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In some situations, array indexes that should be out of bounds may overflow to in bounds array indexes. This can happen due if the index type is wider than the platform int size and gets truncated or if the multiplication by the element size overflows.
The text was updated successfully, but these errors were encountered: