Skip to content

int 31-bit overflow #8

Description

@ip7z

MemoryLatency.c

float RunLatencyTest(uint32_t size_kb, uint64_t iterations) {
    for (int i = 0; i < iterations; i++) {
        current = A[current];

here we have int 31-bit overflow for big iterations value.
Also the code is not optimal, when we compare int with uint64_t in loop.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions