Skip to content
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

epoch: Fix UB in Pointable impl of [MaybeUninit<T>] #694

Merged
merged 1 commit into from
May 27, 2021
Merged

epoch: Fix UB in Pointable impl of [MaybeUninit<T>] #694

merged 1 commit into from
May 27, 2021

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented May 4, 2021

Fixes #693

@taiki-e
Copy link
Member Author

taiki-e commented May 19, 2021

@jeehoonkang Are there any changes that you'd like me to make?

Copy link
Contributor

@jeehoonkang jeehoonkang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for a late response. LGTM, but left a minor comment. Please feel free to merge this.

@@ -238,6 +238,7 @@ impl<T> Pointable for T {
// [`alloc::alloc::Layout::extend`] instead.
#[repr(C)]
struct Array<T> {
/// The number of elements (not the number of bytes).
size: usize,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taiki-e maybe you also want to rename it to len?

@taiki-e
Copy link
Member Author

taiki-e commented May 27, 2021

@jeehoonkang Thanks for the review! I renamed Array::size field to len based on your suggestion.

bors r+

@bors
Copy link
Contributor

bors bot commented May 27, 2021

Build succeeded:

@bors bors bot merged commit 399a92f into master May 27, 2021
@bors bors bot deleted the len branch May 27, 2021 17:23
bors bot added a commit that referenced this pull request May 30, 2021
707: Prepare for the next release r=taiki-e a=taiki-e

- crossbeam-epoch 0.9.4 -> 0.9.5
  - Fix UB in `Pointable` impl of `[MaybeUninit<T>]` (#694)
  - Support targets that do not have atomic CAS on stable Rust (#698)
  - Fix breakage with nightly feature due to rust-lang/rust#84510 (#692)
- crossbeam-queue 0.3.1 -> 0.3.2
  - Support targets that do not have atomic CAS on stable Rust (#698)
- crossbeam-utils 0.8.4 -> 0.8.5
  - Add `AtomicCell::fetch_update` (#704)
  - Support targets that do not have atomic CAS on stable Rust (#698)
- crossbeam 0.8.0 -> 0.8.1
  - Support targets that do not have atomic CAS on stable Rust (#698)

Closes #702 

Co-authored-by: Taiki Endo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Length mismatch in array init causes buffer overflow
2 participants