Conversation
+ Previous version would potentially access freed regions
+ Returned the char* buffer owned by a temporary string that was being freed by the return
+ Valgrind was flagging the manual `delete` as being of mismatched size
pjaaskel
approved these changes
Feb 11, 2026
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.
32d14cd and fa05296 are small and hopefully self-explanatory.
007342d is a bit more interesting, the previous implementation of a timeout thread checked for some object member variables to decide if the simulator should be stopped or not, but didn't account for situations where a long-running program starts a TTA simulation and then destroys the simulator object. If the program stays alive longer than the timeout, the timeout thread wakes up and tries to access the simulator object that it was started from, which is long gone by now. The fix here is to kill the timeout thread when we know that we won't be needing it anymore. Adds a bit of boilerplate which could potentially be minimized by a lambda or something but the impact is small enough that I thought it would be more clear if I just leave it as is.