Fix uninitialized variables, memory leaks#5495
Merged
sturnclaw merged 6 commits intopioneerspacesim:masterfrom Jan 27, 2023
Merged
Fix uninitialized variables, memory leaks#5495sturnclaw merged 6 commits intopioneerspacesim:masterfrom
sturnclaw merged 6 commits intopioneerspacesim:masterfrom
Conversation
- starts_with was being passed an invalid C string pointer - instead, work on std::string_view the entire way
- Several hundreds of refs were leaking their m_copycount values, at 4 bytes per allocation
- GenFaceQuad request (and its owned resources including material instance) were never freed
- The edge index list was permanently leaked every time a GeomTree was constructed
Member
|
Could any of these explain some of the reported bugs on Lua side? |
Member
Author
|
Very unlikely - these are all in C++. The only thing that even comes close to Lua memory was the LuaRef bug, and that was entirely benign other than leaking unused memory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've run AddressSanitizer, LeakSanitizer, and ThreadSanitizer on the code (as well as a brief pass with Valgrind) to clean up any possible issues or errors that might have been introduced without notice.
This PR fixes, in total: