From f4496dc0807d9a29a7ba0d170b49f7ca9b306a9f Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 26 Oct 2017 03:06:00 +0200 Subject: [PATCH] Prevent stack corruption with parallelized use. If the length of the data set for the transform is a prime, then the OpenMP parallelization results in a recursion loop until the stack is corrupted or exhausted. This resolves #1. --- kiss_fft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiss_fft.c b/kiss_fft.c index af2f695..5614838 100644 --- a/kiss_fft.c +++ b/kiss_fft.c @@ -246,7 +246,7 @@ void kf_work( #ifdef _OPENMP // use openmp extensions at the // top-level (not recursive) - if (fstride==1 && p<=5) + if (fstride==1 && p<=5 && m!=1) { int k;