Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Apply mitigation to CimInstance disposal race condition #14

Merged
merged 3 commits into from
Jun 27, 2016

Conversation

cbnilrem
Copy link
Contributor

This change disables automatic cleanup of base class memory, which appears to have been the cause of the race condition. The finalizer for the MI_Instance base class was running ahead of the CimInstance finalizer, causing the allocated block to be cleaned up before an explicit Delete() on the part of the CimInstance finalizer. This change switches to a Dispose() model for freeing MI_NativeObject instances, though it does not carry-through the usage to all appropriate places. As a result this change introduces a rather meaningful memory leak, but the leak is preferable to the crash in the near term as it was slowing down development.

@johnkord
Copy link
Contributor

Signed off, as per our discussion, we'll address the new memory leak at a later time. Not seg-faulting is more important :)

@cbnilrem cbnilrem merged commit efaae3a into master Jun 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants