Skip to content

Int overflow in void HierarchicalSNE<scalar_type, sparse_scalar_matrix_type>::initializeFirstScale() for large data #28

Description

@thoellt

In void HierarchicalSNE<scalar_type, sparse_scalar_matrix_type>::initializeFirstScale() there is the danger of an integer overlow in the for loop .

int idx = i * nn + n; will overflow for moderately large data (> ~25M points, perplexity 30).

Even unsigned will be rather limited. It should be considered to also move to 64bit indices wherever indexing into data structures with multiple values per datapoint.

Activity

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