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

Ensure that allocation doesn't exceed isize::MAX #32

Merged
merged 2 commits into from
Sep 24, 2022
Merged

Conversation

taiki-e
Copy link
Collaborator

@taiki-e taiki-e commented Sep 24, 2022

See rust-lang/rust#95295 and rust-lang/rust#101899 for the context.

```
warning: use of constant `std::isize::MAX` that will be deprecated in a future Rust version: replaced by the `MAX` associated constant on this type
   --> src/utils.rs:100:68
    |
100 |         if !new_align.is_power_of_two() || new_size > core::isize::MAX as usize - (new_align - 1) {
    |                                                                    ^^^
    |
    = note: requested on the command line with `-W deprecated-in-future`

warning: use of associated function `core::num::<impl isize>::max_value` that will be deprecated in a future Rust version: replaced by the `MAX` associated constant on this type
   --> src/raw.rs:313:47
    |
313 | ...                   if state > isize::max_value() as usize {
    |                                         ^^^^^^^^^

warning: use of associated function `core::num::<impl isize>::max_value` that will be deprecated in a future Rust version: replaced by the `MAX` associated constant on this type
   --> src/raw.rs:343:27
    |
343 |         if state > isize::max_value() as usize {
    |
```
Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@taiki-e taiki-e merged commit a3b235d into master Sep 24, 2022
@taiki-e taiki-e deleted the layout-extend branch September 24, 2022 13:45
@notgull notgull mentioned this pull request Mar 24, 2023
notgull added a commit that referenced this pull request Mar 24, 2023
- Ensure that the allocation doesn't exceed `isize::MAX` (#32)
- Add `FallibleTask::is_finished()` (#34)
- Add a metadata generic parameter to tasks (#33)
- Add panic propagation to tasks (#37)
- Add a way to tell if the task was woken while running from the schedule function (#42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants