include/MGIS/Function/FixedSizeModifier.ixx:82, 88, 109, 115, 136, 142, 164, 171.
Finding. The call operator returns std::span<const real, N> built on this->evaluator(i).data(). When the wrapped evaluator returns by value, which unary and binary operations do, that object is a temporary and the returned span dangles. The concept that gates this only requires a data() member, which such temporaries have.
Effect. Wrapping any computed evaluator in a fixed-size view reads dead stack. Reproduced under the address sanitiser, with correct-looking values in optimised builds.
Fix. Return the value itself when the wrapped result is not a reference or a view, or restrict the concept to references and views.
include/MGIS/Function/FixedSizeModifier.ixx:82,88,109,115,136,142,164,171.Finding. The call operator returns
std::span<const real, N>built onthis->evaluator(i).data(). When the wrapped evaluator returns by value, which unary and binary operations do, that object is a temporary and the returned span dangles. The concept that gates this only requires adata()member, which such temporaries have.Effect. Wrapping any computed evaluator in a fixed-size view reads dead stack. Reproduced under the address sanitiser, with correct-looking values in optimised builds.
Fix. Return the value itself when the wrapped result is not a reference or a view, or restrict the concept to references and views.