In a recent KBMOD run, we used an ImageStack of 198 images with pixel dimensions of 4563 x 4563.
When filling out the psi phi arrays in src/kbmod/search/psi_phi_array.cpp, we allocate an array of size 4122551862 (= 4563 x 4563 x 198)
We then iterate over the indices of that array with an int which has a max value of only 2147483647 on most systems. This then resorts in an overflow and segfault.
I switched to using a uint64_t since it is portable across systems.
In a recent KBMOD run, we used an ImageStack of 198 images with pixel dimensions of 4563 x 4563.
When filling out the psi phi arrays in
src/kbmod/search/psi_phi_array.cpp
, we allocate an array of size 4122551862 (= 4563 x 4563 x 198)We then iterate over the indices of that array with an int which has a max value of only 2147483647 on most systems. This then resorts in an overflow and segfault.
I switched to using a
uint64_t
since it is portable across systems.