MESAHub / mesa

Modules for Experiments in Stellar Astrophysics
http://mesastar.org
GNU Lesser General Public License v2.1
138 stars 38 forks source link

fix uninitialized memory in net_burn_const_p.f90 #730

Closed pmocz closed 4 weeks ago

pmocz commented 4 weeks ago

Fixes #726

Set a dummy value for rpar(r_burn_const_P_rho) right before this line: https://github.com/MESAHub/mesa/blob/e29ed74db65f919404919714f058f6ea18cde072/net/private/net_burn_const_p.f90#L198 so it is initialized. The code will calculate the right value later, but prior to that calculation the code (for some reason) has a function that takes the log of this value, so it has to be initialized: https://github.com/MESAHub/mesa/blob/e29ed74db65f919404919714f058f6ea18cde072/net/test/src/mod_one_zone_burn.f90#L1026