Calling isinstance(x,t) repeatedly when x or t is not actually a CLR … by ArvidJB · Pull Request #273 · pythonnet/pythonnet · GitHub
Skip to content

Calling isinstance(x,t) repeatedly when x or t is not actually a CLR …#273

Merged
filmor merged 1 commit into
pythonnet:masterfrom
ArvidJB:isinstance_refcount_leak
Oct 18, 2016
Merged

Calling isinstance(x,t) repeatedly when x or t is not actually a CLR …#273
filmor merged 1 commit into
pythonnet:masterfrom
ArvidJB:isinstance_refcount_leak

Conversation

@ArvidJB

@ArvidJB ArvidJB commented Oct 18, 2016

Copy link
Copy Markdown
Contributor

…object will leak reference counts to PyFalse, resulting in memory corruption once the reference count drops to zero and PyFalse gets freed

…object will leak reference counts to PyFalse, resulting in memory corruption once the reference count drops to zero and PyFalse gets freed
@ArvidJB

ArvidJB commented Oct 18, 2016

Copy link
Copy Markdown
Contributor Author

@den-run-ai

Copy link
Copy Markdown
Contributor

@ArvidJB looks good to me and I confirmed that test this crashes the python interpreter - nice catch! Do you agree to MIT license once we transition? This code appears to be from @filmor, so we will let him review this.

@filmor

filmor commented Oct 18, 2016

Copy link
Copy Markdown
Member

Yep, looks a lot more correct than before, thanks for catching this :)

@filmor filmor merged commit 1a2499b into pythonnet:master Oct 18, 2016
@ArvidJB

ArvidJB commented Oct 18, 2016

Copy link
Copy Markdown
Contributor Author

@ArvidJB ArvidJB deleted the isinstance_refcount_leak branch October 18, 2016 13:37
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