fix allocation-deallocation mismatch on etaart in analysis_protostar_environ - #877
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe change moves Changesetaart lifecycle
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No merge-blocking risk remains; subsequent sink processing can complete before etaart is freed. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks for fixing this, very much appreciated |
Description:
in
analysis_protostar_environ.F90, the primary subroutinedo_analysisallocates etaart once per dump, but the deallocate was at the end of subroutinedoanalysisRPZ, whichdo_analysiscalls once per sink. With two or more sinks the second call reads etaart after it has been freed. therefore, moved the deallocate to the end ofdo_analysisto match the allocate.Components modified:
Type of change:
Testing:
Ran with multiple sinks, did not segfault now.
Did you run the bots? no
Did you update relevant documentation in the docs directory? no
Did you add comments such that the purpose of the code is understandable? no
Is there a unit test that could be added for this feature/bug? no
If so, please describe what a unit test might check:
Related issues: Closes #854
Summary by CodeRabbit