Skip to content

int 31-bit overflow #8

@ip7z

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.

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