kokkos / kokkos-kernels

Kokkos C++ Performance Portability Programming Ecosystem: Math Kernels - Provides BLAS, Sparse BLAS and Graph Kernels
Other
313 stars 98 forks source link

UB sanitizer: most `TwostageGaussSeidel_functor` ctors do not set `forward_sweep` field #2418

Closed cwpearson closed 2 weeks ago

cwpearson commented 2 weeks ago

An example failure here: https://github.com/kokkos/kokkos-kernels/actions/runs/11695504241/job/32571033270

I'm not 100% sure this is actually the problem, but I think it is: this causes the implicitly-defined copy-ctor for this (called internally by Kokkos in e.g. parallel_for) to initialize this bool field from whatever happens to be in memory, which is usually not technically a valid boolean value (e.g. 157).

In Trilinos/packages/kokkos-kernels/sparse/impl/KokkosSparse_twostage_gauss_seidel_impl.hpp

cwpearson commented 2 weeks ago

Fixed in https://github.com/kokkos/kokkos-kernels/pull/2420