Skip to content

<mdspan>: _Fwd_prod_of_extents::_Calculate can potentially overflow when mdspan::size's precondition is satisfied #4023

@StephanTLavavej

Description

@StephanTLavavej

In #3972 (comment), @CaseyCarter observed:

_Calculate computes the product in index_type, which may overflow into UB land even for some values that are representable in size_type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!mdspanC++23 mdspan

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions