PrincetonUniversity / athena

Athena++ radiation GRMHD code and adaptive mesh refinement (AMR) framework
https://www.athena-astro.app
BSD 3-Clause "New" or "Revised" License
226 stars 122 forks source link

Initialize pointer fv_new_ to nullptr #445

Closed kahoooo closed 2 years ago

kahoooo commented 2 years ago

Just stumble upon this bug that is only triggered for decaying turbulence (turb_flag == 1). When turb_flag == 1, fv_new_ would be pointing to random address and the destructor of TurbulenceDriver would attempt to access and free fv_new_[nv].