Repository navigation
Conversation
- Annotate #[must_use] on MemVec::{try_reserve, try_grow, try_resize}, MemBuffer::{try_reserve, try_resize}, and HashMap::{try_reserve, try_grow}
- Guard Box<T>::drop with needs_drop<T>() and Box<T>::{drop, into_inner} dealloc with size_of<T>() != 0
- Guard dealloc in MemArray, MemVec, MemBuffer, FixedMemBuffer, and HashMap (and HashMap::{try_grow, alloc_table}) with length/capacity/size checks, fix MemVec::into_array() leaking capacity when len == 0 && capacity != 0, and prune unreachable functions after native and wasm optimization so empty owners omit free declarations and calls at -O2
- Replace unrolled array drop glue in MIR with a runtime loop (while idx < len) for len >= 2, hoisting non-memory array materialization before the loop and avoiding dead locals on memory-backed places
- Gate try_alloc_ptr and try_realloc_bytes on target = evm/native/wasm to omit dead null checks on EVM
- Add uitests, native/EVM IR tests, MIR drop loop tests, and runtime drop/balanced-allocator execution tests; update shifted uitest snapshots
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[must_use]annotations toMemVec::{try_reserve, try_grow, try_resize},MemBuffer::{try_reserve, try_resize}, andHashMap::{try_reserve, try_grow}.Box<T>::dropwithneeds_drop<T>()andBox<T>::{drop, into_inner}deallocation withsize_of<T>() != 0.MemArray,MemVec,MemBuffer,FixedMemBuffer, andHashMap, fixMemVec::into_array()capacity leak whenlen == 0 && capacity != 0, and prune unreachable functions after native and Wasm optimization so empty owners omitfreedeclarations and calls at-O2.while idx < len) forlen >= 2, hoisting non-memory array materialization before the loop and avoiding dead locals on memory-backed places.try_alloc_ptrandtry_realloc_bytesontarget = evm/native/wasmto omit dead null checks on EVM.Testing
must_use_try_alloc, shifted snapshots),evm_drops,native_backend,fe_test/drops.fe, andnative_runtime.