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
{{ message }}
Repository navigation
Uninitialized read into Re_avg on dead viscous lanes (UB; FP-trap hazard in debug builds) #1567
Symptom: results-inert today (every consumer is gated on the matching Re_size lane), but the code computes 2/(1/uninitialized) — undefined behavior that can trap in debug/FPE builds.
Mechanism: the unguarded do i = 1, 2 Reynolds-averaging loops (src/simulation/m_riemann_solvers.fpp:480-484, :1965-1968, :2627-2630, :3045-3048 on master) write both lanes of Re_avg_rs*_vf even when Re_size(2)==0, in which case the HLLC fill loop never initializes Re_L(2)/Re_R(2).
Introduced: the unguarded form dates to the 2022 GPU development merge (6def75421, @anandrdbz, pre-PR era), when the lane was garbage-but-defined via dflt_real; it became genuinely uninitialized when #1035 dropped that initialization (2025-11-13). Tagging @anandrdbz for context.
Fix: pending in the Phase-3 refactoring series (stacked on #1556): the extracted Reynolds helper writes a defined 1/sgm_eps into dead lanes.
Activity