Skip to content

Add overflow_assert! #1159

Open
Open

Description

@ojeda

See https://lore.kernel.org/rust-for-linux/CANiq72=VbcYroRz1EcbzHqFHwaHLewK+DvK756ropM16pDdMuw@mail.gmail.com/

The name mimics other {kind}_assert!s like debug_assert!, as well as core's ub-checks one (assert_unsafe_precondition!).

Please double check if there are already asserts out there (or perhaps even new ones) that could make use of it, and transform (or add) them in a second patch etc.

See #1162 as well.


This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes (including generating the documentation if changed, running the Rust doctests if changed, etc.), to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and to add a Suggested-by: tag, and a Link: tag to this issue. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.

Activity

  1. added
    easyExpected to be an easy issue to resolve.
    mediumExpected to be an issue of medium difficulty to resolve.
    • libRelated to the `rust/` library.
    on Apr 25, 2025
  2. antonio-hickey commented on Apr 25, 2025

    @antonio-hickey

    I'll take this on

  3. capDoYeonLee commented on Jul 19, 2025

    @capDoYeonLee

    Hi, @ojeda :)
    is this issue valid?
    If it's okay, can I give it a try?

  4. ojeda commented on Jul 19, 2025

    @ojeda
    MemberAuthor

    It was sent by @antonio-hickey at https://lore.kernel.org/rust-for-linux/20250629024310.97937-1-contact@antoniohickey.com/

    We need some reviews, so it would be nice if you could take a look at it and give a "Reviewed-by" -- thanks!

  5. adsdemaybe commented on Jun 22, 2026

    @adsdemaybe

    hey @ojeda,
    looking to make my first mark on this project. saw that this was an old issue. is the previous comment still valid?
    checking the email thread, it seems like v4 hasnt fully been reviewed yet, but i dont really know.

  6. ojeda commented on Jun 22, 2026

    @ojeda
    MemberAuthor

    The latest is v5: https://lore.kernel.org/rust-for-linux/20250819003824.23019-1-contact@antoniohickey.com/

    Reviews (and testing with Tested-by: ...!) there are definitely welcome -- I think it is close to ready, but I left some comments there for a v6.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    easyExpected to be an easy issue to resolve.good first issueGood for newcomersmediumExpected to be an issue of medium difficulty to resolve.• libRelated to the `rust/` library.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions