Repository navigation
Clear the record cache between unit test cases - #61
Merged
Merged
Conversation
Collaborator
To me this describes a premature I don't see much performance cost to eliminating |
Applied fix for access violation / seg fault within the test harness. testdbCleanup() frees every record at the end of each IOCHelper test case, but devsup.db._rec_cache keeps the Record objects, whose pointers then dangle. A later test case calling getRecord() on the same name got the stale object, causing segfaults. Also add tests which reuse record names to cover this scenario
Collaborator
|
We found that this issue only occurs in the unit tests and not in the running IOC. So the record cache is added back but the unit test harness is updated to clear the cache between tests. Peter also added tests that reuse the record name to test the fix |
Collaborator
|
Also it looks like the CI failures are separate issue we can fix with another PR |
tynanford
force-pushed
the
no_cache_records
branch
from
October 26, 2026 18:42
d9bb0b3 to
f0ad79d
Compare
tynanford
approved these changes
Oct 26, 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.
See #60
Re-used record instances stored in _rec_cache do not work, as they are invalided by the record instance destructor.
This usage causes segmentation faults and/or unpredictable behaviour as highlighted in #60
Added tests for use of array record types, although the noted issue has turned out to be generic to all types.