Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve integer overflow when running on a large 3D image #249

Merged
merged 1 commit into from
Sep 12, 2023

Commits on Sep 2, 2023

  1. Resolve integer overflow when running on a large 3D image

    In a computation like x+y*nx+z*(nx*ny) if the sub-computation y*nx or
    z*(nx*ny) overflows the size of a 32-bit integer, we will get a bogus
    result even though the final destination is a 64-bit integer.
    The solution is to promote at least one operand to a bigger-sized
    integer. Since long can also be 32-bit on 32-bit architectures, we just
    use explicit named types here.
    This patch also fixes a few cases of comparisons of integers with
    different signs.
    
    Resolves: stardist#235
    ximion committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    1f17f25 View commit details
    Browse the repository at this point in the history