-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[liballoc] Adds checks for UB during allocation. #22069
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
Conversation
They're only enabled in debug builds, but a panic is usually more welcome than UB in debug builds.
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
Should we take this opportunity to do size<=int::MAX as well? |
I guess that'd be a pro-social thing to do. |
Due to the way we ship |
I think this is beneficial, and we will probably want to have some way for external users to opt-in to the debug assertions in the stdlib anyway. It may be better to wait until we default to removing debug assertions, but personally I'm happy adding this now. |
r? @gankro (transferring reviewership, don't have the bandwidth right now.) |
Closing due to inactivity, but feel free to reopen with a rebase! |
…Gankro They're only enabled in debug builds, but a panic is usually more welcome than UB in debug builds. Previous review at rust-lang#22069 r? @gankro cc @huon
…Gankro They're only enabled in debug builds, but a panic is usually more welcome than UB in debug builds. Previous review at rust-lang#22069 r? @gankro cc @huon
They're only enabled in debug builds, but a panic is usually more
welcome than UB in debug builds.