Skip to content

Conversation

@crStiv
Copy link

@crStiv crStiv commented Nov 7, 2025

Replace std::mem::zeroed() with MaybeUninit for safe array initialization in ArrayOfVecs split_at method.
References don't have a zero representation, so zeroed() was creating invalid values leading to potential UB.

The fix uses MaybeUninit arrays that are safely initialized element by element before being converted to initialized arrays via array_assume_init().
Also removed the #[allow(invalid_value)] attribute that's no longer needed.

@reviewable-StarkWare
Copy link

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants