-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Unsafe vector overflow #26550
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
Could you clarify what the undefined behavior you're seeing is? This is just a standard panic for me:
|
Forgot to mention, this only happens on nightly (in release builds).
|
The SIGILL is the result of the failure to malloc the entire address space. I believe the only undefined behavior badness the |
cc @gankro |
That's what's happening. I was expecting
whereas decreasing the memory a bit to get an OOM errors inside of |
There's another unchecked addition here: |
They're both fixed in #26563 |
Indeed, sorry. |
This gives undefined behaviour due to overflow:
The problem is the overflow on the addition here:
rust/src/libcollections/vec.rs
Lines 1485 to 1489 in a643092
The text was updated successfully, but these errors were encountered: