Skip to content

SaturatedSliceIter::next has overflow bug #3468

Closed

Description

@youknowone
$ cargo run Lib/test/test_list.py -v -k test_extendedslicing

test_extendedslicing (__main__.ListTest) ... thread 'main' panicked at 'attempt to add with overflow', vm/src/builtins/slice.rs:377:9

Probably introduced in #3340

Activity

  1. Snowapril commented on Nov 28, 2021

    @Snowapril
    Contributor
    cargo run Lib/test/test_userlist.py -v -k test_extendedslicing 

    above one also panicked by same reasom

  2. Snowapril commented on Nov 28, 2021

    @Snowapril
    Contributor
    a = self.type2test(range(10))
    del a[9::1<<333]

    These line make panicked

  3. Snowapril commented on Nov 28, 2021

    @Snowapril
    Contributor

    SaturatedSliceIter used for both set_slice and del_slice, but del_slice seems required different condition for iterating.
    set_slice(subscript in cpython) loop with condition on slice length, but del_slice(ass_subscript in cpython) check current index is over stop or not.

  4. added a commit that references this issue on Nov 28, 2021
    296afbc
  5. added a commit that references this issue on Nov 28, 2021
    e740de6
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions