You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
include/MGIS/Function/TFEL/TensorModifier.ixx:32-35, with EvaluatorModifierBase.ixx:50, 58, 66, 76.
Finding.apply maps a TFEL tensor view onto values.data(), where values is bound to the prvalue returned by the wrapped evaluator. When that evaluator returns by value, the view points at a destroyed temporary. The requirement that gates the modifier only asks for a data() member.
Effect. Re-interpreting the output of a unary operation or a transform as a TFEL tensor reads dead stack. Reproduced under the address sanitiser; at higher optimisation levels the values happen to be right.
Fix. Map when the result is a reference or a lightweight view, copy otherwise.
Activity
Fix Issue #287
Fix Issue #287
[-]Tensor modifier maps a temporary[/-][+]Tensor modifier may map a temporary[/+]Merge pull request #299 from thelfer/287-tensor-modifier-maps-a-tempo…