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

accfft_local_size calls and integer overflow #23

Open
jrt54 opened this issue Jun 25, 2019 · 0 comments
Open

accfft_local_size calls and integer overflow #23

jrt54 opened this issue Jun 25, 2019 · 0 comments

Comments

@jrt54
Copy link

jrt54 commented Jun 25, 2019

When looking at the "step2f" example and using a domain of size 840 x 840 x 840, I get a segfault. This is on a 64-bit CPU architecture.

I think the culprit is the routine "accfft_local_size_dft_r2cf", which returns an integer and encounters overflow. The returned value was 0 to "alloc_max", which then results in a segfault due to subsequent malloc calls using a value of 0.

Note that if I use 2 ranks, this no longer results in a segfault, since I just barely avoid issues with overflow.

Can accfft_local_size_dft_r2cf be changed to return a size_t type or unsigned int instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant