Skip to content

Conversation

@tukss
Copy link

@tukss tukss commented Nov 7, 2025

When building with GCC 15, which introduced assertion errors for out-of-bounds accesses to std::vector, I see these errors in several of the tests:

/usr/include/c++/15/bits/stl_vector.h:1263: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&
; size_type = long unsigned int]: Assertion '__n < this->size()' failed.   

They originate in two different parts of IOStream.cpp, where the FieldDims array was too small. This PR fixes that by changing the size accordingly.

As this is my first PR to Omega, I'd appreciate some comments because I don't know the details of the I/O framework.

tukss added 2 commits November 7, 2025 10:47
Previously cases an out-of-bounds access to DimLengths in
computeDecomp. This change matches the other call in the same file.
This is to prevent an out-of-bounds access in the next loop.
Copy link

@philipwjones philipwjones left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes and they are indeed correct. Verified that Ctests still pass and the files look as expected. Since this is your first PR, we won't make a big deal about process, but for future PRs, please use the E3SM/Omega branch naming convention (ie starting with component name so this would be omega/fix-out-of-bounds). Also, for bug fix PRs, it's good to have the bug reported as an issue first. No worries this time and thanks again.

@philipwjones philipwjones self-assigned this Nov 10, 2025
@philipwjones philipwjones merged commit 1ba2778 into E3SM-Project:develop Nov 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants