Skip to content

Bug Fix: IO Buffer Used Before Initialization - #638

Merged
feathern merged 3 commits into
geodynamics:mainfrom
feathern:print
Jul 24, 2026
Merged

Bug Fix: IO Buffer Used Before Initialization#638
feathern merged 3 commits into
geodynamics:mainfrom
feathern:print

Conversation

@feathern

Copy link
Copy Markdown
Contributor

This PR addresses a bug that was causing the IO Buffer's print method to be called before the buffer was initialized. This bug seemed to only arise when reference_type=4 was used along with benchmarking mode. What's odd is that it was causing a crash in the custom-reference-state test, but that crash wasn't causing the tester to throw an error.

It would be good to review/approve quickly if you have a minute @tukss @illorenzo7 @cianwilson

@feathern

Copy link
Copy Markdown
Contributor Author

Just a quick note, you can see the crash clearly in the custom-reference testing section of my draft PR #637 . It looks like I introduced this bug two years ago, but I'm still unclear on why the tester is passing even with the crash.

@tukss tukss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Not sure why it didn't crash in the test either. Have a look at the stylistic comment.

Comment thread src/Physics/Benchmarking.F90 Outdated
Co-authored-by: Philipp Edelmann <edelmann-github@fs.tum.de>
@feathern

Copy link
Copy Markdown
Contributor Author

Great. I accepted the change and will merge once the tests clear again. Thanks for the quick review.

@feathern
feathern merged commit 126656d into geodynamics:main Jul 24, 2026
7 checks passed
@illorenzo7

Copy link
Copy Markdown
Contributor

Thanks @tukss and @feathern! Sorry you were too quick for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants