Visitar URL original
indexing zero-length lists · Issue #813 · IronLanguages/ironpython2 · GitHub
Skip to content

indexing zero-length lists #813

Open

Description

@thautwarm

.NET 6 throws ArgumentOutOfRangeException when executing the following code:

newData = new List<T>(icnt);
for (int i = start; i > stop; i += step) {
newData[index++] = l[i];

Activity

  1. thautwarm commented on Mar 30, 2022

    @thautwarm
    Author

    It seems that such code is not used in IronPython 2. I found this bug when reusing the code for a Unity IL2CPP compatible .NET Python implementation.

  2. slozier commented on Mar 30, 2022

    @slozier
    Contributor

    It seems that such code is not used in IronPython 2. I found this bug when reusing the code for a Unity IL2CPP compatible .NET Python implementation.

    Indeed, looks like extended slicing doesn't work with List<T> and this code is never invoked.

    Doesn't appear to be an issue with IronPython 3 (the code has changed since it split from ironpython2).

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