Skip to content

tests: Size the vector in NegativeMemory.AllocationCount - #13607

Merged
spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
apollo-2006:tests-allocation-count-reserve
Oct 30, 2026
Merged

spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
apollo-2006:tests-allocation-count-reserve

Conversation

@apollo-2006

Copy link
Copy Markdown
Contributor

NegativeMemory.AllocationCount calls reserve() and then writes through &mems[i], but reserve() doesn't change the size, so every index is past the end. With libstdc++ assertions on (GCC 16 debug builds), that trips Assertion '__n < this->size()' failed and aborts the whole test binary, so none of the tests after it run.

This sizes the vector up front instead. The test passes, and the full suite on the test ICD now runs to the end with 0 failures.

Found it while running the suite for #13572 :)

reserve() doesn't change the size, so &mems[i] indexed past the end.
With libstdc++ assertions (GCC 16 debug builds) this aborts the whole
test binary.
@apollo-2006
apollo-2006 requested a review from a team as a code owner October 30, 2026 18:04
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build.

@spencer-lunarg
spencer-lunarg merged commit 3306db0 into KhronosGroup:main Oct 30, 2026
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.

3 participants