forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use MaybeUninit more properly in streamer::batch_send() (#3325)
An array of iovec was previously created as a MaybeUninit, and then immediately marked as initialized with assume_init(). This was likely a workaround was iovec not having a Default implementation, but this also created undefined behavior since the iovec type has pointers. With the bump to rust 1.82, this was causing the validator to crash This change uses the MaybeUninit interface to more properly create the libc types as MaybeUninit, initialize them, and then transmute them to their regular, initialized counterpart types
- Loading branch information
Showing
1 changed file
with
45 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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