-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
add missing null ptr check in alloc example #99198
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
Looks sensible to me, @bors r+ rollup |
add missing null ptr check in alloc example `alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
add missing null ptr check in alloc example `alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
add missing null ptr check in alloc example `alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
add missing null ptr check in alloc example `alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
Rollup of 7 pull requests Successful merges: - rust-lang#98839 (Add assertion that `transmute_copy`'s U is not larger than T) - rust-lang#98998 (Remove branch target prologues from `#[naked] fn`) - rust-lang#99198 (add missing null ptr check in alloc example) - rust-lang#99344 (rustdoc: avoid inlining items with duplicate `(type, name)`) - rust-lang#99351 (Use `typeck_results` to get accurate qpath res for arg mismatch error) - rust-lang#99378 (interpret/visitor: add missing early return) - rust-lang#99394 (Add regression test for rust-lang#95230) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
alloc
can return null on OOM, if I understood correctly. So we should never just deref a pointer we get fromalloc
.