Skip to content

slvndx overflows its 12 bits #379

@jcelerier

Description

@jcelerier

I'm hitting an issue in fftw-3.3.10 when calling fftw_plan_dft_r2c_1d, where slvndx in

static plan *search(planner *ego, const problem *p, unsigned *slvndx, 		    flags_t *flagsp)

gets computed to 4153 (> 4096) and thus overflows its 12-bit bitfield and triggers the check in planner.c:

     /* keep this check enabled in case we add so many solvers
	that the bitfield overflows */
     CK(SLVNDX(slot) == slvndx);    

I am building with:

CC=clang-19
CFLAGS=-O0 -g3

./configure  --enable-threads \
  --enable-fma \
  --enable-generic-simd128 \
  --enable-generic-simd256 \
  --enable-sse2 \
  --enable-avx \
  --enable-avx-128-fma \
  --enable-avx2 \
  --disable-fortran

If I remove some options, for instance:

CC=clang-19
CFLAGS=-O0 -g3

./configure  --enable-threads \
  --enable-fma \
  --enable-avx \
  --enable-avx-128-fma \
  --enable-avx2 \
  --disable-fortran

then the issue goes away (but then I guess my fftw will not work on older CPUs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions